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

    https://github.com/apache/spark/pull/15471#discussion_r85248929
  
    --- Diff: core/src/main/scala/org/apache/spark/api/r/RBackendHandler.scala 
---
    @@ -83,7 +86,29 @@ private[r] class RBackendHandler(server: RBackend)
               writeString(dos, s"Error: unknown method $methodName")
           }
         } else {
    +      // To avoid timeouts when reading results in SparkR driver, we will 
be regularly sending
    +      // heartbeat responses. We use special code +1 to signal the client 
that backend is
    +      // alive and it should continue blocking for result.
    +      val execService = 
ThreadUtils.newDaemonSingleThreadScheduledExecutor("SparkRKeepAliveThread")
    --- End diff --
    
    @shivaram we can reuse it. `scheduleAtFixedRate` returns `ScheduledFuture` 
which can be used to cancel the task. However, there is no `awaitTermination` 
for `ScheduledFuture` after cancelling a future. We need some extra work.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to