Add comment for the code where we replace the semaphore in the exception handler

This commit is contained in:
A.J. Beamon 2019-02-11 10:35:29 -08:00
parent 5bf7e72fc5
commit 32b3c2ad69
1 changed files with 2 additions and 0 deletions

View File

@ -613,6 +613,8 @@ class Future(_FDBBase):
try:
semaphore.acquire()
except:
# If this semaphore didn't actually get released, then we need to replace our thread-local
# copy so that later callers still function correctly
_thread_local_storage.future_block_semaphore = multiprocessing.Semaphore(0)
raise