Potential deadlock and resource leak when Receiver
is dropped in crossbeam_channel
's bounded channel
#1102
Labels
Receiver
is dropped in crossbeam_channel
's bounded channel
#1102
I have encountered a situation where the code gets stuck indefinitely and the content in the channel's buffer is not dropped when the receiver is dropped.
I'm not sure if this behavior is intended or if it represents a bug in the
crossbeam_channel
library. The situation is causing a potential deadlock and resource leaks in my code. I would appreciate further investigation by the upstream maintainers to clarify this behavior.Here is the minimal reproducing code:
I expect that
fn main
won't get stuck and I expect to see "dropping block 1" printed to the terminal. However, in reality, the code gets stuck and "dropping block 1" is not printed.If I comment out
let _cx_clone = cx.clone();
, then it does not hang.The text was updated successfully, but these errors were encountered: