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:
Stephanie Wang
2018-11-07 22:39:28 -08:00
committed by GitHub
parent 0bab8ed95c
commit d950e92f63
23 changed files with 460 additions and 281 deletions
+4
View File
@@ -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"