I may need to rethink my approach. It looks like the new way of
reference counting won't quite work out how I need it to. I must admit
I am abusing the reference counting a bit. Essentially I'm queuing
work using uv_queue_work then unref'ing the loop using uv_unref so
that node can exit if the work isn't done yet, then in the after
method I uv_ref'ing the loop so that the count isn't off.
https://github.com/joeferner/node-serialport2/blob/master/src/serialport_win.cpp#L195

What I guess I'm really looking for is a uv_queue_work which doesn't
add a reference to the loop. I looked at using uv_thread_create but I
need an after function that is on the loop if the work does finish.

On May 31, 10:48 pm, Nathan Rajlich <[email protected]> wrote:
> Essentially you ref/unref the uv_handle_t instances individually now,
> instead of the one uv_loop_t. Here's how I'm doing it for 
> node-ffi:https://github.com/rbranson/node-ffi/commit/02588f775de89aecde82a43bc...
>
>
>
>
>
>
>
> On Thu, May 31, 2012 at 7:21 PM, Joe Ferner <[email protected]> wrote:
> > Looks like with node v0.7.9 uv_default_loop now returns a uv_loop_t. I
> > used to use uv_ref and uv_unref but they still take uv_handle_t. How
> > do you add references to the loop with v0.7.9?
>
> > --
> > 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

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

Reply via email to