Propagate reason to client-side FutureCancelledError
when closing the scheduler
#8830
Labels
enhancement
Improve existing functionality or make things work better
Scheduler.close
takes areason
keyword which allows us to provide additional context. However, when it comes to cancelling client-side futures, we simply abort the comm causing the Client to cancel the futures withreason=scheduler-connection-lost
. It would be great if we could propagate the closing reason to the client and use it when cancelling futures in order to help users understand what's happening. For example, if the scheduler shuts down due to theidle-timeout
kicking in, it would be great it we told the users that the futures were cancelled because we exceeded the timeout, not because we lost the connection due to some unknown reason.The text was updated successfully, but these errors were encountered: