当前位置: 首页>>代码示例>>Python>>正文


Python dummy_threading.Event方法代码示例

本文整理汇总了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 = [] 
开发者ID:KTH,项目名称:royal-chaos,代码行数:20,代码来源:core.py

示例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 
开发者ID:Soft8Soft,项目名称:verge3d-blender-addon,代码行数:8,代码来源:socketserver.py

示例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 = [] 
开发者ID:ntu-dsi-dcn,项目名称:ntu-dsi-dcn,代码行数:13,代码来源:core.py

示例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 
开发者ID:fabioz,项目名称:PyDev.Debugger,代码行数:8,代码来源:_pydev_SocketServer.py

示例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)] 
开发者ID:RobotGame,项目名称:rgkit,代码行数:12,代码来源:game.py


注:本文中的dummy_threading.Event方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。