On Monday, February 10, 2014 1:51:20 PM UTC-7, booch wrote:
>
> Hi all,
>
> I'm wondering if anyone knows an easy way around an issue I'm seeing.
>
> I have some code using libuv for its threadpool.c feature. Unfortunately 
> this code forks. When the child exits we run the destructor code 
> theadpool.c:cleanup...since the child inherited most of the parent it has 
> an allocated threads array, and initialized == 1, but since it's a fork it 
> has no other started threads. With no other threads the uv_thread_join 
> fails and the library aborts when unloading.
>
> Has anyone ran into this before and found a workaround? Is there a 
> notify_of_fork method that I'm missing?
>
> Thanks,
> MY
>

Update: I worked around this in the code I was refactoring, but am 
interested in people's thoughts on this still. Is the shutdown behavior of 
threadpool expected; as in, works as designed and libuv thread pooling is 
incompatible with forked processes. Or is this a bug and a reset_after_fork 
or some other utility necessary?

Thanks,
MY 

-- 
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 http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to