On Fri, Sep 2, 2016 at 2:21 PM, J Decker <[email protected]> wrote:

>
>
> On Fri, Sep 2, 2016 at 1:53 PM, Saúl Ibarra Corretgé <[email protected]>
> wrote:
>
>>
>>
>>>
>> why would one want to use multiple loops?  and add a loop per async then?
>>>
>>>
>> It depends on the use case. In yours, you probably want multiple async
>> handles.
>>
>> I really think I do.... but if I don't call run after close it libuv
> genrates an assert(0) ; yes I'm running a debug build and if I built it
> release it wouldn't crash?  But if I continue and ignore the assert it does
> crash anyway.
>
>
>
>>
>>>     > on destructor I do uv_close( (uv_handle_t*)&async, NULL );
>>>     > uv_run( fbdl.loop, UV_RUN_DEFAULT );
>>>     >
>>>
>>>     As mentioned above, bad idea.  Even if you use a new loop, why?  Why
>>>     not
>>>     use the existing loop?  Are you also using other threads?
>>>
>>> So I shouldn't use multple Async objects each with their own .data
>>> referencing a object?
>>>
>>
>> Yes.
>>
>>
> You just said 'you probably want multiple async handles' and to 'so I
> should NOT use multiple async objects" you say yes?
>
> I phrased it differently so I could get a clear answer.
>
>
>
>
>> is the exsting loop ' get_default_loop()' so I shouldn't close it?  I
>>> never do?
>>>
>>>
>> Yes, you can get it from the current Environment object, then call
>> event_loop() on it.  Example: https://github.com/nodejs/node
>> /blob/1b99093df78b795052c944fc6388a934e84e89ef/src/timer_wrap.cc#L99-L100
>>
>>
Under windows, this doesn't link,  .... env.h is not a header that's
provided for addon modules.

and if I steal the .h, there's no library to provide
'Environemt::event_loop()



> --
>> Saúl Ibarra Corretgé
>> http://bettercallsaghul.com
>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "libuv" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/libuv/XXOovowH8EE/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/libuv.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to