Skip to content

Commit

Permalink
[catnap] Enhancement: Try tracking of pending_ops for async_close()
Browse files Browse the repository at this point in the history
  • Loading branch information
anandbonde committed Nov 30, 2023
1 parent dbd0a32 commit acbb42b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rust/catnap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,10 @@ impl SharedCatnapLibOS {
let coroutine_constructor = || -> Result<TaskHandle, Fail> {
let task_name: String = format!("Catnap::close for qd={:?}", qd);
let yielder: Yielder = Yielder::new();
let yielder_handle = yielder.get_handle();
let coroutine: Pin<Box<Operation>> = Box::pin(self.clone().close_coroutine(qd, yielder));
self.runtime.insert_coroutine(&task_name, coroutine)
self.runtime
.insert_coroutine_with_tracking(&task_name, coroutine, yielder_handle, qd)
};

queue.async_close(coroutine_constructor)
Expand Down

0 comments on commit acbb42b

Please sign in to comment.