mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 21:52:06 -04:00
Clarify that cds_wfcq_dequeue_blocking() doesn't block if empty
This commit is contained in:
parent
b9cbd3bc76
commit
912eaf6cb9
1 changed files with 4 additions and 0 deletions
|
|
@ -70,6 +70,10 @@ isc_quota_release(isc_quota_t *quota) {
|
|||
* We are using the cds_wfcq_dequeue_blocking() variant here that
|
||||
* has an internal mutex because we need synchronization on
|
||||
* multiple dequeues running from different threads.
|
||||
*
|
||||
* NOTE: cds_wfcq_dequeue_blocking() checks whether the queue is free
|
||||
* with cds_wfcq_empty() before acquiring the internal lock, so if
|
||||
* there's nothing queued, the call should be very lightweight.
|
||||
*/
|
||||
struct cds_wfcq_node *node =
|
||||
cds_wfcq_dequeue_blocking("a->jobs.head, "a->jobs.tail);
|
||||
|
|
|
|||
Loading…
Reference in a new issue