sptk



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: r952 - in trunk: sptk4 src/utils



I'm trying to make the CWaiter class more correct. So, the form of the
sendSignal that doesn't lock is incorrect. It isn't used internally in SPTK,
or any of my projects.I can return it back, if you need it, though.

2009/9/30 Ilya A. Volynets-Evenbakh <ilya@total-knowledge.com>

> alexey@mail.total-knowledge.com wrote:
> > Removed dead method CWaiter::sendSignalNoLock().
> >
> It's not a dead method. It's the sendSignal, which is a useless one from
> mutex semantics point of view.
>
> Generally correct way to deal with signal is
> - lock mutex
> - do something
> - send signal
> - unlock mutex
>
> Otherwise you get race conditions.
>
> --
> Ilya A. Volynets-Evenbakh
> http://www.total-knowledge.com
>
>


-- 
Alexey Parshin,
http://www.sptk.net

List hosted by Total Knowledge

Authoright © Total Knowledge: 2005