$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-08-16 05:08:57
From: <williamkempf_at_[hidden]>
> Well, the preferred method shortens the pattern a little:
>
> {
> mutex::scoped_lock lock(m);
> cv.wait(lock, pred);
> action();
> }
Yes; the real problem is that without Lambda, there is no simple way to
define 'pred' in-place.
The perfect syntax would be
cv.wait(q.empty(), command = q.pop());
How close can we get within std C++ to it?
-- Peter Dimov Multi Media Ltd.