Re: Co-thread for parallel processing

Srinivasa T N <[email protected]> Fri, 02 Dec 2011 16:56:57 +0530
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <[email protected]>
> 1. What the proper way to the main thread to wait for all co-threads
> until finished?
> 2. After calling pthread_cond_signal() or pthread_cond_broadcast()
> followed by sleep()/nanosleep(),
>      the condition variable looks like not signaled, (the co-thread
> routine doesn't run). What make this?
I think you need a pthread_cond_broadcast () after do_work () in each 
thread.

Regards,
Seenu.