File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 1313]
1414
1515INSTALL_REQUIRES = [
16- 'requests>=2.25 .1' ,
17- 'pyyaml>=5.4. 1' ,
16+ 'requests>=2.9 .1' ,
17+ 'pyyaml>=5.1' ,
1818 'docopt>=0.6.2' ,
1919 'enum34;python_version<"3.4"' ,
2020]
Original file line number Diff line number Diff line change 11"""Threading utilities."""
2- import threading
3-
4-
5- _EventClass = threading .Event
2+ from threading import Event , Condition
63
74
85class EventGroup (object ):
96 """EventGroup that can be waited with an OR condition."""
107
11- class Event (_EventClass ): # pylint:disable=too-few-public-methods
8+ class Event (Event ): # pylint:disable=too-few-public-methods
129 """Threading event meant to be used in an group."""
1310
1411 def __init__ (self , shared_condition ):
@@ -18,18 +15,18 @@ def __init__(self, shared_condition):
1815 :param shared_condition: shared condition varaible.
1916 :type shared_condition: threading.Condition
2017 """
21- _EventClass .__init__ (self )
18+ Event .__init__ (self )
2219 self ._shared_cond = shared_condition
2320
2421 def set (self ):
2522 """Set the event."""
26- _EventClass .set (self )
23+ Event .set (self )
2724 with self ._shared_cond :
2825 self ._shared_cond .notify ()
2926
3027 def __init__ (self ):
3128 """Construct an event group."""
32- self ._cond = threading . Condition ()
29+ self ._cond = Condition ()
3330
3431 def make_event (self ):
3532 """
You can’t perform that action at this time.
0 commit comments