Skip to main content

cleanup_ports_for_task

Function cleanup_ports_for_task 

Source
pub fn cleanup_ports_for_task(owner: TaskId)
Expand description

Clean up all ports owned by a dying task.

For each port: drain queued messages and deliver error replies to any callers blocked in wait_for_reply, then destroy the port.

NOTE: Only covers messages still in the queue. If the owner already recv’d a message but died before calling reply(), the caller task remains stuck. Servers should handle their own graceful shutdown.