BIND 10 #2332: define and implement wrapper interface for conditional variables
BIND 10 Development
do-not-reply at isc.org
Mon Oct 8 09:41:56 UTC 2012
#2332: define and implement wrapper interface for conditional variables
-------------------------------------+-------------------------------------
Reporter: | Owner:
jinmei | Status: new
Type: task | Milestone: Next-Sprint-
Priority: | Proposed
medium | Resolution:
Component: | Sensitive: 0
b10-auth | Sub-Project: DNS
Keywords: | Estimated Difficulty: 0
Defect Severity: N/A | Total Hours: 0
Feature Depending on Ticket: |
background zone loading |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by vorner):
I don't think that the implicit acquiring and releasing is a problem. Or
do you
mean some other one than it is released when you do wait and acquired
again
before the wait terminates? I think this would work (provided the Mutex
adds
some kind of friend declaration for the condition):
{{{#!c++
Mutex mutex;
CondVar condvar(mutex);
void
doSomething() {
Mutex::Locker locker(mutex);
…
// Make sure we have enough of X
while (X < enough) {
condvar.wait();
}
…
}
}}}
--
Ticket URL: <http://bind10.isc.org/ticket/2332#comment:1>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list