|
Boost : |
Subject: Re: [boost] Performance of boost::mutex and boost::mutex::scoped_lock
From: Anteru (newsgroups_at_[hidden])
Date: 2009-06-12 09:08:45
> This should ultimately result in an infinite timeout being specified to the
> system call, so all of this computation seems completely unnecessary. It
> seems like a scoped_lock should completely bypass anything having to do with
> date_time, and perhaps even normal timed locks should come up with a more
> efficient strategy.
>
>
> Thoughts?
I agree with this. I actually didn't use the timed locks so far, and I
would assume that a non-timed-lock is the standard case -- and this case
should be optimized for. Optimally, if no timeout is specified, I would
expect boost::mutex to be equivalent to calling ::WaitForSingleObject
(..., INFINITE) on Windows, or ::EnterCriticalSection , whichever is faster.
Cheers,
Anteru
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk