Skip to content

Commit

Permalink
Callback clone for sharing callbacks from stack
Browse files Browse the repository at this point in the history
  • Loading branch information
vertexclique committed Oct 21, 2019
1 parent 929b1e9 commit 97f9e9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lightproc/src/raw_proc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ where
let guard = Guard(raw);

if let Some(before_start_cb) = &(*raw.stack).before_start {
(*before_start_cb)();
(*before_start_cb.clone())();
}

let poll = <F as Future>::poll(Pin::new_unchecked(&mut *raw.future), cx);
Expand Down Expand Up @@ -444,7 +444,7 @@ where
}

if let Some(after_complete_cb) = &(*raw.stack).after_complete {
(*after_complete_cb)();
(*after_complete_cb.clone())();
}

// Drop the task reference.
Expand Down

0 comments on commit 97f9e9a

Please sign in to comment.