Comments (6)
Yeah I've been waiting for things to stabilise for a while now, and the plan is to definitely move things over to it once they have. This question was raised a while ago (the issue seems to have vanished) and at that time the futures/tokio guys were in alpha development of a v2/3 and i was waiting for that to stabilise, but things seemed to stall with stuff being merged into the core language instead.
I don't have plans currently to link up to the existing futures/tokio/romio stuff, partly because I'm not using the nightly compiler, only the stable version available in my Linux distro, partly also due to being rather busy currently and not wanting to potentially waste effort on potentially outdated crates.
I am not certain how difficult it might be to link up the existing closure based callbacks and tokio now, the delay waiting for things to stabilise and not using a nightly compiler (only the stable one available in my Linux distro) meant that I have yet to end up exploring use of this stuff.
from pulse-binding-rust.
Any updates?
from pulse-binding-rust.
@MaxVerevkin Unfortunately not really, no, sorry. I started looking into it a while ago but did not get very far and have not had time yet to try again. While on the face of it it's not a big deal to transform the API functions to return futures, there are complications and difficulties in figuring out how to wire up everything behind the scenes to work correctly, which is the problem.
From what I recall, one relatively small complication I was struggling with was figuring out how the cancellation mechanism of Operation
objects could possibly be wired up such that dropping a future involving one would correctly cancel execution of the callback. I also very vaguely remember some requirement I found in the documentation of core or tokio regarding consistency or inconsistency of some important component of managing tasks I think it was, and I could not understand how on earth to deal with that requirement, and I can't remember now what on earth it even was. :/
The biggest thing I don't recall ever getting my head around fully was figuring out what was necessary to actually marry the futures with the mainloops, such that the C callback events fired by the mainloop would trigger updates of those futures, which I guess may involve creating custom executor or something. As you can tell, I really need a refresh on all of this stuff, and possibly some guidance in order to figure it out.
from pulse-binding-rust.
I don't know if this would be useful at all for you but I have started wrapping parts this library with futures/streams for my personal use.
https://github.com/Pajn/libpulse-futures
from pulse-binding-rust.
@Pajn, ok, thanks, I'll take a look. Must get on with this...
from pulse-binding-rust.
Now that async/await is stable it would be very cool to see this crate utilize Futures.
I'm willing to help if this is something that there is interest in
from pulse-binding-rust.
Related Issues (20)
- Licensing change
- Potential unsafety in context? HOT 9
- Windows support HOT 7
- Possible undefined behavior due to missing `Send` for callbacks HOT 6
- question, I'm stuck to just retrieve the sink infos HOT 6
- Error: invalid argument when calling Simple.read() HOT 1
- Record Stream never calls read callback. HOT 5
- Assertion 'q->front' failed at pulsecore/queue.c:81, function pa_queue_push(). Aborting. Aborted (core dumped) HOT 4
- Lifetime mismatch around .get() HOT 3
- get_str documentation inaccurate HOT 3
- libpulse-binding build on docs.rs fails for version 2.24 HOT 2
- Soundness issue HOT 4
- Make SinkInfo, ServerInfo, and similar types available outside of callbacks HOT 4
- Documentation typo? HOT 1
- CI failure - floating point calculation assertions HOT 6
- Use `FnOnce` in API where applicable
- CI failure, again... HOT 1
- Possible UB in `get_api` function HOT 6
- Cross compile error HOT 1
- Missing documentation HOT 4
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 pulse-binding-rust.