pub async fn copy_duplex_abortable<A, B>(
a: &mut A,
b: &mut B,
__arg2: (usize, usize),
__arg3: (AbortRegistration, AbortRegistration),
) -> Result<(u64, u64), Error>
Expand description
Variant of copy_duplex
with an option to abort either side early using the given
AbortRegistrations
.
Once a side is aborted, its proper shutdown is initiated, and once done, the other side’s shutdown is also initiated. The difference between the two abort handles is only in the order - which side gets shutdown first after the abort is called.