-
Notifications
You must be signed in to change notification settings - Fork 13.3k
"failed at 'sending on a closed channel'" when using Future #14892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Closing as working as intended. Each future will send the result of its computation along a channel, but what's happening here is that you're spawning a future and the closing the receiving half of the channel by dropping the future. When the task is done it then sends the result on an empty channel, failing the task. |
The user doesn't care that a |
It's a benign failure that no one needs to know about. Closes rust-lang#14892
MIR episode 6 This PR separates monomorphization from interpreting, and add a monomorphization query to cache the results. Together with making layout queries returning `Arc<Layout>` instead of `Layout` (did you know that `Layout` is a 312 byte struct with a couple of vectors, so it is very costly to clone? I thought it should be very small and cheap) it makes mir interpreting an order of magnitude faster in warmed calls. It still can't evaluate no test in the r-a repo, but all tests that I tried are hitting rust-lang#7434 so I hope after that it will become able to interpret some real world test.
While playing around with opening a bunch of files and collecting the results I ran into
task '<unnamed>' failed at 'sending on a closed channel', C:\bot\slave\nightly-win\build\src\libstd\comm\mod.rs:509
errors. The errors are not deterministic, so sometimes the code works and sometimes not. The error happens with and without-O
. Here is a reduced test case:Here's another one courtesy of @huonw (this one errors more rarely, at least for me):
The text was updated successfully, but these errors were encountered: