Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22816#discussion_r228012035
  
    --- Diff: 
core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala ---
    @@ -114,7 +114,7 @@ private[spark] abstract class BasePythonRunner[IN, OUT](
     
         context.addTaskCompletionListener[Unit] { _ =>
           writerThread.shutdownOnTaskCompletion()
    -      if (!reuseWorker || !released.get) {
    +      if (!reuseWorker || released.compareAndSet(false, true)) {
    --- End diff --
    
    I think `released` variable here indices if `releasePythonWorker` is 
actually called or not. Do you mind if I ask to elaborate why this `released` 
it set to `true` here as well?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to