mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-02 06:00:39 +00:00
Merge pull request #283 from cjmayo/python3_32
{python3_32} fixes for Python 3 + Travis test: fix threads
This commit is contained in:
commit
dbbb64cd90
1 changed files with 3 additions and 3 deletions
|
|
@ -27,12 +27,12 @@ class StoppableThread (threading.Thread):
|
|||
def __init__ (self):
|
||||
"""Store stop event."""
|
||||
super(StoppableThread, self).__init__()
|
||||
self._stop = threading.Event()
|
||||
self._stopper = threading.Event()
|
||||
|
||||
def stop (self):
|
||||
"""Set stop event."""
|
||||
self._stop.set()
|
||||
self._stopper.set()
|
||||
|
||||
def stopped (self, timeout=None):
|
||||
"""Return True if stop event is set."""
|
||||
return self._stop.wait(timeout)
|
||||
return self._stopper.wait(timeout)
|
||||
|
|
|
|||
Loading…
Reference in a new issue