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

    https://github.com/apache/spark/pull/9317#discussion_r43541649
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/client/AppClient.scala ---
    @@ -200,7 +210,18 @@ private[spark] class AppClient(
     
           case r: RequestExecutors =>
             master match {
    -          case Some(m) => context.reply(m.askWithRetry[Boolean](r))
    +          case Some(m) =>
    +            receiveAndReplyThreadPool.execute(new Runnable {
    --- End diff --
    
    At first I was trying to put these 2 calls into something like 
`Utils.tryWithSafeFinally` with blocks  as arguments but the call ended up 
looking a little confusing as to what was happening.
    
    maybe just a regular function like this would be better, although a little 
less flexible
    
    ```scala
    private def receiveAndReplyAsync[T](masterRef: RpcEndpointRef, context: 
RpcCallContext,
                                         msg: T): Unit = {
      // execute ask and reply in thread pool
      ..
    ```


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