Comments (11)
Hm, I think I am hitting this. In a program I write, Selector::wait
reliably blocks forever and takes 3/4 messages to unblock (on linux). I'll try to publish a reproduction shortly (this is code for my yet to be published blog post, I'll re-make it using crossbeam).
This feels like a pretty critical correctness bug to me ;-) I do not want to push for a fix here (this is open source software, it absolutely is ok to let things like this slip), but I do want to note that, imo, the graveness of this bug doesn't match the production-readiness status, signaled by the readme. (and of course there's a chance that it's my code which is broken :) ).
from flume.
This hangs on Linux too according to CI
from flume.
I guess we have to disable it on Linux too or fix it.
from flume.
This implies there is a race condition. Should anybody get the time to investigate: Selector
is quite similar to async receivers in that they don't immediately pick up items (since multiple receivers could pick up an item at once, leading to a dropped item).
from flume.
I'm experiencing the same issue on Windows and Linux.
from flume.
Using wait_timeout
or similar seems to fix the problem somewhat, the Selector still hangs up, but returns successfully after the timeout passed.
from flume.
@post-rex Sorry about this. It's on my to-do list of things to fix, perhaps over the next week.
from flume.
@post-rex Sorry about this. It's on my to-do list of things to fix, perhaps over the next week.
Thanks that would be awesome!
from flume.
@matklad Yep, this is a persistent issue that I've been trying to make time to fix for a while now. To the best of my knowledge, it's the only actual bug in the crate (at least, the crate has now been in use by quite a few projects for several months and nothing has come up besides this). Part of the reason I've not gotten to resolving it yet is that I'm rather unhappy with the API of Selector
overall (it doesn't map particularly well to a select!
macro) so resolving it would likely come with an overhaul of the API. This past weekend I've been overhauling another crate I maintain, euc
, so I think I'll try to get to fixing this issue and making other improvements to flume
in the week after the holiday period.
from flume.
@matklad Would you happen to still be in a position to see whether you have this issue?
from flume.
The test that this issue specifically mentions now passes (thanks @tesuji). On the assumption that this implies that the bug if fixed, I'm closing the issue. If this turns out to not be the case, I can re-open the issue.
from flume.
Related Issues (20)
- `flume::Sender<T>` stops to send messages to `flume::Receiver<T>` when passed through `.await` point HOT 2
- The last messge won't be triggered in async code block. HOT 8
- `async`: `send_timeout` & `send_deadline` HOT 3
- Question: Fairness when multiple receivers are doing work-stealing HOT 2
- Document features HOT 1
- Generic over backing storage / statically allocated bounded channels HOT 1
- MPMC Not working or no Broadcasting HOT 3
- async selector HOT 2
- Semantic violation that involves rendezvous channel and selector HOT 4
- Lost message when selecing on MPMC in loop from multiple threads HOT 2
- Senders and receivers are both unusable in browser main thread in WASM
- Do we need to add a timeout for `recv_async`? HOT 1
- `SendFut::poll` should return `Poll::Pending` for rendezvous channels when no item is queued
- recv on an empty unbounded channel keeps the task busy. HOT 1
- Add a `force_send()` function to `flume::Sender`?
- Resize the capacity of bounded channels HOT 1
- Clarify behavior rendezvous channels HOT 10
- Memory leak in unbounded channels HOT 1
- chan.waiting `push_front` instead of `push_back`? Thread scheduling HOT 1
- Performance with many senders on multi-threaded runtime
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flume.