Skip to content

Commit 8947da4

Browse files
author
Matias Melograno
committed
improvements
1 parent 6e2b13a commit 8947da4

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
]
1414

1515
INSTALL_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
]

splitio/util/threadutil.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
"""Threading utilities."""
2-
import threading
3-
4-
5-
_EventClass = threading.Event
2+
from threading import Event, Condition
63

74

85
class 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
"""

0 commit comments

Comments
 (0)