At Tue, 22 Oct 2013 15:43:52 +0800,
Liu Yuan wrote:
> 
> On Tue, Oct 22, 2013 at 04:13:12PM +0900, Hitoshi Mitake wrote:
> > Current work.c uses mutex for starting worker threads
> > (startup_lock). The intention of the code is hard to understand. In
> > addition, the code doesn't destroy newly created threads when it fails
> > creating or growing work queues.
> > 
> > This patch refactors the code and implement correct cleaning of
> > threads.
> > 
> > Signed-off-by: Hitoshi Mitake <mitake.hito...@lab.ntt.co.jp>
> > ---
> >  lib/work.c |   59 
> > +++++++++++++++++++++++++++++++++++++++++++----------------
> 
> I don't see the point that you make the code simpler with pipe, you add more
> lines than removal!

My intention is that using the sequence of lock -> unlock for randezvous is
unclear so replacing the mechanism with ordinal randezvous based on
pipe(). In this case, I believe lines of codes doesn't matter.

Thanks,
Hitoshi
-- 
sheepdog mailing list
sheepdog@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to