You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Occasionally one of the threads hangs even though the function (some_func) returns successfully.
This happens after a successful function call when trying to dequeue the result in self.__queue.get():
@property
def value(self):
"""Read-only property containing data returned from function."""
if self.ready is True:
flag, load = self.__queue.get()
if flag:
return load
raise load
It did not reproduce locally, only on prod environment where I used gdb to see what was going on.
Going over the timeout code, I could not figure out what would cause this condition.
Perhaps the library is not thread safe?
Any other idea what could cause this behavior?
As a safety mechanism perhaps you should set the self.__queue.get() to be non blocking
self.__queue.get_nowait()
The text was updated successfully, but these errors were encountered:
I have a multi-threaded program in which threads call a function decorated with the timeout-decorator:
Occasionally one of the threads hangs even though the function (some_func) returns successfully.
This happens after a successful function call when trying to dequeue the result in self.__queue.get():
It did not reproduce locally, only on prod environment where I used gdb to see what was going on.
Going over the timeout code, I could not figure out what would cause this condition.
Perhaps the library is not thread safe?
Any other idea what could cause this behavior?
As a safety mechanism perhaps you should set the self.__queue.get() to be non blocking
self.__queue.get_nowait()
The text was updated successfully, but these errors were encountered: