avantgardnerio commented on code in PR #151:
URL: https://github.com/apache/arrow-ballista/pull/151#discussion_r950287963


##########
ballista/rust/executor/src/executor_server.rs:
##########
@@ -289,18 +317,34 @@ impl<T: 'static + AsLogicalPlan, U: 'static + 
AsExecutionPlan> Heartbeater<T, U>
         Self { executor_server }
     }
 
-    async fn start(&self) {
+    fn start(&self, graceful: &Graceful) {
         let executor_server = self.executor_server.clone();
+        let mut heartbeat_shutdown = graceful.subscribe_for_shutdown();
+        // Not used directly.
+        let heartbeat_complete = graceful.shutdown_complete_tx.clone();
         tokio::spawn(async move {
             info!("Starting heartbeater to send heartbeat the scheduler 
periodically");
-            loop {
+            // Drop and notifies the receiver half that the shutdown is 
complete

Review Comment:
   That's a well-reasoned explanation, thank you :+1: 



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

Reply via email to