Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-10-26 19:08:32


Peter Dimov wrote:

> void unblock_all()
> {
> if( (volatile const long&)blocked_ > 0 )
> {
> long k = InterlockedExchange( &blocked_, 0 );
>
> if( k > 0 )
> {
> ReleaseSemaphore( sema_rw_, 1, 0 );

This obviously should be

                  ReleaseSemaphore( sema_rw_, k, 0 );

I'm not sure how this managed to pass the test at all.

> }
> }
> }


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk