-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Using Chan from a thread created from a c library crashes after sometime #12391
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
It looks like the new |
Whoops, testing a fix now (sorry about that!) |
The fairness yield mistakenly called `Local::take()` which meant that it would only work if a local task was available. In theory sending on a channel (or calling try_recv) requires no runtime because it never blocks, so there's no reason it shouldn't support such a use case. Closes #12391
thanks! |
sorry to post on a closed issue, but i'm finding the same problem now in SyncChan/SyncPort not sure if it's a real bug or in this case it's supposed to work like that? |
You won't be able to use those off the runtime because a send involves then receiving which blocks the task. You're only able to block if you have a local rust task available. |
that's what i was suspecting, thanks! |
Reporting this here after asking in IRC
something like this:
where c_callback is called from a thread created by the c library crashes the application after a while with:
previously SharedChan seemed to work without problem
The text was updated successfully, but these errors were encountered: