mirror of
https://github.com/wassname/ray.git
synced 2026-07-08 14:07:54 +08:00
Allow multiple threads to call ray.get and ray.wait (#3244)
* Handle multiple threads calling ray.get * Multithreaded ray.wait * Pass in current task ID in java backend * Add multithreaded actor to tests, add warning messages to worker for multithreaded ray.get * Fix test * Some cleanups * Improve error message * Add assertion * Cleanup, throw error in HandleTaskUnblocked if task not actually blocked * lint * Fix python worker reset * Fix references to reconstruct_objects * Linting * java lint * Fix java * Fix iterator
This commit is contained in:
@@ -423,3 +423,7 @@ def thread_safe_client(client, lock=None):
|
||||
if lock is None:
|
||||
lock = threading.Lock()
|
||||
return _ThreadSafeProxy(client, lock)
|
||||
|
||||
|
||||
def is_main_thread():
|
||||
return threading.current_thread().getName() == "MainThread"
|
||||
|
||||
Reference in New Issue
Block a user