Channel moved in closure, that is later invoked by thread::spawn never receives the data even though the send succeeds #139019
Labels
C-discussion
Category: Discussion or questions that doesn't represent real issues.
I tried this code:
I expected to see this happen: To have OK printed. The recv blocks forever, and the send was never propagated. If I swap the
panic_after
to thread::spawn, it works. I'm not ruling out that I made some mistake, maybe, but I don't see how, since I pass the closure to both, and thepanic_after
invokes that closure.Instead, this happened: panic occurs since the closure never receives the data
Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: