flume
flume copied to clipboard
File a issue with the standard library?
If this is feature equivalent, wouldn't it be a good idea to try and get it merged into std?
There has been some talk on the T-libs Zulip about this, so it's definitely a goal! Currently we are fixing some bugs and trying to optimize so that we don't perform so poorly compared to crossbeam for low-bound bounded channels, rendezvous channels, and SPSC channels. Here is what the benches currently look like (0.7.1). We are beating std in almost all the benches but we have the aforementioned areas of weakness.
Here are the latest numbers from the flavour-refactor
branch (Linux, AMD Ryzen 7, 4 cores, 8 threads).
Was there any more progress on this? I am possibly interested in helping out.
I suppose the first challenge is that there isn't an optional std feature for flume (i.e. no-std + alloc or whatever support), and I am not sure how one could make one without breaking up std into more crates first (because of std::thread
usage, etc.)
Yea. I think it would probably need to be source copied into std because of this?
Well then it's liable to stagnate; I prefer approaches were std can just use the crates.io crate to better leverage the good work being done in the ecosytem on an ongoing basis :).
I've an in-progress refactor that builds the channel on top of a no-std, async core. I believe that this could act as the step necessary to facilitate porting to std. However, it's not finished yet.
So the idea then would be that std would use the core and wrap it (in house) with synchronicity primitives to fit in the mpsc api?
Yes, I think that's the most reasonable approach.
Oh, nice! Looking forward to seeing that. Even as a heavily WIP draft PR :).
@zesterer Any luck? Maybe want to open a WIP PR?
I've not done a huge amount of work on the branch and it still has a few subtle issues that need resolving (mostly relating to async usage). However, I can open a PR for discussion about it.
I've opened a draft PR here.
I don't know how much time I'll get to work on this. If you or someone else wants to work on resolving some of the issues, I'd be very happy to accept PRs!
Thanks!