Share the per-run cancel-token slot. Used by stream worker state to observe cancellation when classifying a failed run.
(
&self,
)
| 176 | /// Share the per-run cancel-token slot. Used by stream worker state to |
| 177 | /// observe cancellation when classifying a failed run. |
| 178 | pub(super) fn cancel_token_slot( |
| 179 | &self, |
| 180 | ) -> Arc<tokio::sync::Mutex<Option<tokio_util::sync::CancellationToken>>> { |
| 181 | Arc::clone(&self.cancel_token) |
| 182 | } |
| 183 | |
| 184 | pub(super) async fn clear_cancel_token(&self) { |
| 185 | *self.cancel_token.lock().await = None; |