Am 27.06.2014 um 22:45 schrieb mscdex <msc...@gmail.com>:

> On Friday, June 27, 2014 12:25:09 PM UTC-4, Ingwie Phoenix wrote:
> This is supposed to be sort-of modeled after child_process.spawn. What 
> posibilities do I have, to emit events across threads? 
> 
> 
> Have you already looked into `uv_async_send()` ? That would be for signalling 
> the main thread (node) from your other thread (PHP). If you had a separate 
> loop for PHP, you could use uv_async_send() to send in the other direction as 
> well.

Oi. Definitively going to check this out.

PHP is only a "one-shot" thing. but if I ran it on the main thread, it'd be 
blocking. So it only runs thru, and once it emits "end", its gone. o.o So, no 
two-way communication.
Thanks for pointing out the function!

Do you happen to know the async type in uv? I am sure I have seen something 
like uv_async_t...I just cant memorize it.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/78E4FC74-6CB7-4DB6-9DA4-9E82F4B25BA0%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to