Allow to wait a condition variable in midi::TaskService
midi::TaskService is a utility class to allow users to run a task
that is bound to the class instance on another thread safely.
To destruct the instance safely, we need to ensure that no tasks
that may refer the instance are not running on other threads.
Originally the feature was implemented with rwlock, but when rwlock
was removed from the base library, it was changed to use a
condition variable.
Change-Id: I0bfe71800ce43332e96623f2a415975d481c9efb
Bug: 796830
Reviewed-on: https://chromium-review.googlesource.com/833851
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527971}
CrOS-Libchrome-Original-Commit: 129091daa1acd388aa674c73dbae06dcca03a75a
1 file changed