> On May 5, 2015, at 2:11 PM, Matthew Ahrens <[email protected]> wrote: > > The manpage is wrong (or at least, incompletely describes the behavior). > Here's the source: > > /* > * Wait for all pending tasks to complete. > * Calling taskq_wait from a task will cause deadlock. > */ > void > taskq_wait(taskq_t *tq) > ... > while (tq->tq_task.tqent_next != &tq->tq_task || tq->tq_active != 0) > cv_wait(&tq->tq_wait_cv, &tq->tq_lock); > > The check for tq_active is what makes this usage possible (dispatch from a > callback, taskq_wait() waits until the entire queue is drained).
Serves me right for RTFM instead of UTSL. Objection lifted, count me as an approver so long as taskq_wait() is used prior to taskq_destroy (which it is, IIRC). Ship it! Dan _______________________________________________ developer mailing list [email protected] http://lists.open-zfs.org/mailman/listinfo/developer
