hvanhovell commented on code in PR #56397: URL: https://github.com/apache/spark/pull/56397#discussion_r3382056781
########## udf/worker/core/src/main/scala/org/apache/spark/udf/worker/core/direct/DirectWorkerProcess.scala: ########## @@ -138,11 +191,36 @@ private[direct] final class WorkerArtifacts( private[this] val closed = new AtomicBoolean(false) + // Resource-cleanup callbacks run during close(), in registration order, after + // the process is reaped. Guarded by `this` so registration and the close-time + // drain do not race; in practice all hooks are registered at spawn time, + // before the bundle is exposed to any close path. + private[this] val cleanupHooks = scala.collection.mutable.ArrayBuffer.empty[() => Unit] Review Comment: Use a `CopyOnWriteArrayList`? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
