Comments (14)
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.
from flume.
Yes, I think that's the most reasonable approach.
from flume.
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.
from flume.
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!
from flume.
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.
from flume.
Here are the latest numbers from the flavour-refactor
branch (Linux, AMD Ryzen 7, 4 cores, 8 threads).
from flume.
Was there any more progress on this? I am possibly interested in helping out.
from flume.
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.)
from flume.
Yea. I think it would probably need to be source copied into std because of this?
from flume.
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 :).
from flume.
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?
from flume.
Oh, nice! Looking forward to seeing that. Even as a heavily WIP draft PR :).
from flume.
@zesterer Any luck? Maybe want to open a WIP PR?
from flume.
Thanks!
from flume.
Related Issues (20)
- Awaiting disconnection of Receiver or Sender HOT 2
- Race condition in the async code when sender drops too quickly HOT 1
- `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
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.