本文整理汇总了Python中dummy_threading.Event方法的典型用法代码示例。如果您正苦于以下问题:Python dummy_threading.Event方法的具体用法?Python dummy_threading.Event怎么用?Python dummy_threading.Event使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dummy_threading
的用法示例。
在下文中一共展示了dummy_threading.Event方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import dummy_threading [as 别名]
# 或者: from dummy_threading import Event [as 别名]
def __init__(self, viz):
"""!
Initializer function.
@param self: class object.
@param viz: class object.
@return none
"""
super(SimulationThread, self).__init__()
assert isinstance(viz, Visualizer)
self.viz = viz # Visualizer object
self.lock = threading.Lock()
self.go = threading.Event()
self.go.clear()
self.target_time = 0 # in seconds
self.quit = False
self.sim_helper = ns.visualizer.PyViz()
self.pause_messages = []
示例2: __init__
# 需要导入模块: import dummy_threading [as 别名]
# 或者: from dummy_threading import Event [as 别名]
def __init__(self, server_address, RequestHandlerClass):
"""Constructor. May be extended, do not override."""
self.server_address = server_address
self.RequestHandlerClass = RequestHandlerClass
self.__is_shut_down = threading.Event()
self.__shutdown_request = False
示例3: __init__
# 需要导入模块: import dummy_threading [as 别名]
# 或者: from dummy_threading import Event [as 别名]
def __init__(self, viz):
super(SimulationThread, self).__init__()
assert isinstance(viz, Visualizer)
self.viz = viz # Visualizer object
self.lock = threading.Lock()
self.go = threading.Event()
self.go.clear()
self.target_time = 0 # in seconds
self.quit = False
self.sim_helper = ns.visualizer.PyViz()
self.pause_messages = []
示例4: __init__
# 需要导入模块: import dummy_threading [as 别名]
# 或者: from dummy_threading import Event [as 别名]
def __init__(self, server_address, RequestHandlerClass):
"""Constructor. May be extended, do not override."""
self.server_address = server_address
self.RequestHandlerClass = RequestHandlerClass
self.__is_shut_down = threading.Event() # @UndefinedVariable
self.__shutdown_request = False
示例5: __init__
# 需要导入模块: import dummy_threading [as 别名]
# 或者: from dummy_threading import Event [as 别名]
def __init__(self, *args, **kwargs):
super(ThreadedGame, self).__init__(*args, **kwargs)
# events set when actions_on_turn are calculated
self._has_actions_on_turn = [threading.Event()
for _ in range(settings.max_turns + 1)]
# events set when state are calculated
self._has_state = [threading.Event()
for _ in range(settings.max_turns + 1)]