#148 Change locking method
This commit is contained in:
@@ -133,7 +133,7 @@ class AbsChunkedInputStream(io.BytesIO, HaltListener):
|
|||||||
self.stream_read_halted(chunk, int(time.time() * 1000))
|
self.stream_read_halted(chunk, int(time.time() * 1000))
|
||||||
self.chunk_exception = None
|
self.chunk_exception = None
|
||||||
self.wait_for_chunk = chunk
|
self.wait_for_chunk = chunk
|
||||||
self.wait_lock.wait()
|
self.wait_lock.wait_for(lambda: self.available_chunks()[chunk])
|
||||||
if self.closed:
|
if self.closed:
|
||||||
return
|
return
|
||||||
if self.chunk_exception is not None:
|
if self.chunk_exception is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user