Neon: Async API

Created on 26 Dec 2015  Â·  12Comments  Â·  Source: neon-bindings/neon

Any plans for an async API? Any road blocks that you would anticipate?

Great module! Cheers.

API archive

Most helpful comment

@loyd It's working its way up my priority queue but not at the top just yet—I've been focused on Electron support first. I haven't dropped this but can't give an ETA just yet, I'm afraid…

All 12 comments

@kjvalencik Can you please clarify what you mean by “_an async API_”?

Maybe I'm missing something (I'm a noob at Rust), but there doesn't appear to be a way to safely accept a callback, grab a libuv thread for execution and stop blocking the event loop.

https://github.com/nodejs/nan#nancallback

If it is possible, an example would be excellent! Thanks.

Yep, we'll definitely need something like that. One of my near-term plans is to sketch up an API road map.

Whats the current Status on this and how would you like to see this implemented?
This is the biggest blocker for using Neon for me, so if I can help you with, I am happy to do so.

It mostly comes down to, how you would like to see Callback and AsyncWorker to be interfaced by Rust. Especially AsyncWorker is really tricky.

@Drakulix I'm getting ready to start looking into this, but I haven't used Nan's AsyncWorker etc. Can you help get me up to speed? Where should I go to learn more about them (other than the API docs, of course)?

@dherman If you have questions, I should be able to answer them.

Maybe would it be possible by chaining scopes like this:

nodejs -> Nan[dispatch-async-stuff] -> neon[process-sync-stuff] ?

What is the current status on this?

@loyd It's working its way up my priority queue but not at the top just yet—I've been focused on Electron support first. I haven't dropped this but can't give an ETA just yet, I'm afraid…

I think this is implemented by https://github.com/neon-bindings/neon/pull/214 and can be closed.

@kjvalencik Agreed! o/

Was this page helpful?
0 / 5 - 0 ratings