sebastianhillig-db commented on code in PR #45635:
URL: https://github.com/apache/spark/pull/45635#discussion_r1542041741


##########
core/src/main/scala/org/apache/spark/api/python/PythonWorkerFactory.scala:
##########
@@ -95,10 +95,20 @@ private[spark] class PythonWorkerFactory(
   def create(): (PythonWorker, Option[Long]) = {
     if (useDaemon) {
       self.synchronized {
-        if (idleWorkers.nonEmpty) {
+        // Pull from idle workers until we one that is alive, otherwise create 
a new one.
+        while (idleWorkers.nonEmpty) {

Review Comment:
   Ugh, sorry - the force push broke that link. I'm referring to 
"releaseWorker" using the same synchronization, so we should not be adding new 
workers while this code runs.



-- 
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]

Reply via email to