GithubHelp home page GithubHelp logo

Comments (6)

jnqnfe avatar jnqnfe commented on June 3, 2024 1

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.

MaxVerevkin avatar MaxVerevkin commented on June 3, 2024 1

Any updates?

from pulse-binding-rust.

jnqnfe avatar jnqnfe commented on June 3, 2024 1

@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.

Pajn avatar Pajn commented on June 3, 2024

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.

jnqnfe avatar jnqnfe commented on June 3, 2024

@Pajn, ok, thanks, I'll take a look. Must get on with this...

from pulse-binding-rust.

russelltg avatar russelltg commented on June 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.