mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 18:44:07 +08:00
[Java] fix shutdown lock typo (#11410)
This commit is contained in:
@@ -174,7 +174,11 @@ public final class RayNativeRuntime extends AbstractRayRuntime {
|
||||
|
||||
@Override
|
||||
public void shutdown() {
|
||||
Lock writeLock = shutdownLock.readLock();
|
||||
// `shutdown` won't be called concurrently, but the lock is also used in `NativeObjectStore`.
|
||||
// When an object is garbage collected, the object will be unregistered from core worker.
|
||||
// Since GC runs in a separate thread, we need to make sure that core worker is available
|
||||
// when `NativeObjectStore` is accessing core worker in the GC thread.
|
||||
Lock writeLock = shutdownLock.writeLock();
|
||||
writeLock.lock();
|
||||
try {
|
||||
if (rayConfig.workerMode == WorkerType.DRIVER) {
|
||||
|
||||
Reference in New Issue
Block a user