That looks like it works! ^_^

Thanks for that hint. :) That basically fixed a big issue I had. Instead of 
threading, and letting a message loop circle around in a seperate thread, it 
now works in the same loop. much cleaner, more embedded and integrated :)

Thanks, and kind regards!
Am Do. Feb. 20 2014 23:21:58 schrieb Fedor Indutny:

> This is exactly the loop that node.js runs on, it is using the only default 
> one.
> 
> On Fri, Feb 21, 2014 at 2:19 AM, Kevin Ingwersen
> <[email protected]> wrote:
>> And this won't cause any troubble with the already existing uv_loop?
>> Am Do. Feb. 20 2014 23:12:45 schrieb Fedor Indutny:
>> 
>>> You could use `uv_default_loop()`.
>>> 
>>> On Fri, Feb 21, 2014 at 1:49 AM, Kevin Ingwersen
>>> <[email protected]> wrote:
>>>> Hey!
>>>> 
>>>> Thanks for the fast answer - that appears to be what I am looking for! :)
>>>> 
>>>> I have tried to include the env.h file from within the nodejs source tree, 
>>>> but either it is not present in my version (v0.10.24) or its simply not in 
>>>> the include path given by node-gyp.
>>>> In order to properly use uv_prepare_init, I need to supply a uv_loop_t 
>>>> pointer. So I need to retrive the one that NodeJS uses all the way. Do you 
>>>> know of an easy way to do that? I found the callback type definition - 
>>>> that should be OK. I just need to pull the uv_loop_t ^^.
>>>> 
>>>> Kind regards, Ingwie
>>>> Am Do. Feb. 20 2014 22:07:13 schrieb Fedor Indutny:
>>>> 
>>>>> Hi!
>>>>> 
>>>>> You could use `uv_prepare_t`, or `uv_idle_t`, or `uv_check_t`
>>>>> depending on your needs. See
>>>>> https://github.com/joyent/libuv/blob/master/include/uv.h#L1253 for
>>>>> details.
>>>>> 
>>>>> Cheers,
>>>>> Fedor.
>>>>> 
>>>>> On Fri, Feb 21, 2014 at 12:56 AM, Kevin Ingwersen
>>>>> <[email protected]> wrote:
>>>>>> Hey there.
>>>>>> 
>>>>>> I need to add a function to libuv's event loop. It must be run each time 
>>>>>> in the stack, and once I do not want the function to run anymore, i need 
>>>>>> to be able to "unplug" the function. How can I archieve this?
>>>>>> 
>>>>>> Kind regards, Ingwie.
>>>>>> 
>>>>>> --
>>>>>> --
>>>>>> Job Board: http://jobs.nodejs.org/
>>>>>> Posting guidelines: 
>>>>>> 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 post to this group, send email to [email protected]
>>>>>> To unsubscribe from this group, send email to
>>>>>> [email protected]
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>>>> 
>>>>>> ---
>>>>>> 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 [email protected].
>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>> 
>>>> 
>>>> 
>>>> --
>>>> --
>>>> Job Board: http://jobs.nodejs.org/
>>>> Posting guidelines: 
>>>> 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 post to this group, send email to [email protected]
>>>> To unsubscribe from this group, send email to
>>>> [email protected]
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>> 
>>>> ---
>>>> 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 [email protected].
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>> 
>> 
>> 
>> --
>> --
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines: 
>> 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 post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>> 
>> ---
>> 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 [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.



-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to