pub trait Terminate: Send {
// Required method
fn terminate(&self);
}Expand description
A switch that can be separately managed by another thread.
This is the only way to wake up a blocking send() or recv() by yourself. (Not by the other end)
TransportSend and TransportRecv must be able to provide such a switch that triggers Termination error for its own send() or recv().