
12 Jun
2009
12 Jun
'09
1:08 p.m.
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