mirror of
https://github.com/clearml/clearml
synced 2025-04-02 00:26:05 +00:00
Fix python 2.7 debugger threading issues
This commit is contained in:
parent
39ba074b70
commit
2c1e314fbf
@ -1,5 +1,7 @@
|
||||
from threading import Lock
|
||||
import time
|
||||
from threading import Lock
|
||||
|
||||
import six
|
||||
|
||||
|
||||
class AsyncManagerMixin(object):
|
||||
@ -36,7 +38,12 @@ class AsyncManagerMixin(object):
|
||||
if r.ready():
|
||||
continue
|
||||
t = time.time()
|
||||
r.wait(timeout=remaining)
|
||||
# bugfix for python2.7 threading issues
|
||||
if six.PY2 and not remaining:
|
||||
while not r.ready():
|
||||
r.wait(timeout=2.)
|
||||
else:
|
||||
r.wait(timeout=remaining)
|
||||
count += 1
|
||||
if max_num_uploads is not None and max_num_uploads - count <= 0:
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user