Skip to content

Commit

Permalink
Update WfContext::cancelled to take &self instead of &mut self (#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
rossdylan authored Nov 30, 2023
1 parent 2f56b81 commit 193b087
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdk/src/workflow_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,12 @@ impl WfContext {
}

/// A future that resolves if/when the workflow is cancelled
pub async fn cancelled(&mut self) {
pub async fn cancelled(&self) {
if *self.am_cancelled.borrow() {
return;
}
self.am_cancelled
.clone()
.changed()
.await
.expect("Cancelled send half not dropped");
Expand Down

0 comments on commit 193b087

Please sign in to comment.