mirror of
https://github.com/wassname/ray.git
synced 2026-07-09 02:41:45 +08:00
Consodiate CI Python tests and fix bug about multiple ray.init (#4195)
This commit is contained in:
committed by
Robert Nishihara
parent
9c48cc27aa
commit
6f1a29ad3f
@@ -161,6 +161,9 @@ class Worker(object):
|
||||
# This event is checked regularly by all of the threads so that they
|
||||
# know when to exit.
|
||||
self.threads_stopped = threading.Event()
|
||||
# Index of the current session. This number will
|
||||
# increment every time when `ray.shutdown` is called.
|
||||
self._session_index = 0
|
||||
|
||||
@property
|
||||
def task_context(self):
|
||||
@@ -2064,6 +2067,7 @@ def disconnect():
|
||||
if hasattr(worker, "logger_thread"):
|
||||
worker.logger_thread.join()
|
||||
worker.threads_stopped.clear()
|
||||
worker._session_index += 1
|
||||
|
||||
worker.connected = False
|
||||
worker.cached_functions_to_run = []
|
||||
|
||||
Reference in New Issue
Block a user