Todd Lipcon has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/9572 )
Change subject: condition_variable: rework timed waiting mechanisms and associated cleanup ...................................................................... condition_variable: rework timed waiting mechanisms and associated cleanup This patch reworks ConditionVariable::TimedWait into two new methods: 1. WaitFor(delta), equivalent to TimedWait. 2. WaitUntil(deadline), waits for a deadline to elapse. Besides the improved ergonomics of using WaitUntil() when all one has on hand is a deadline, WaitUntil() also yields more precise timeouts when dealing with spurious wakeups while waiting in a loop; the WaitFor methods in CountDownLatch and ThreadPool stand to benefit from this. I also cleaned up some dead portability code in condition_variable.cc. Change-Id: Ie2d3d0d9d84c3b1a76f3efc8ae706ddcaa455630 Reviewed-on: http://gerrit.cloudera.org:8080/9572 Tested-by: Kudu Jenkins Reviewed-by: Todd Lipcon <[email protected]> --- M src/kudu/master/catalog_manager.cc M src/kudu/server/diagnostics_log.cc M src/kudu/tserver/heartbeater.cc M src/kudu/tserver/scanners.cc M src/kudu/util/async_logger.cc M src/kudu/util/blocking_queue.h M src/kudu/util/condition_variable.cc M src/kudu/util/condition_variable.h M src/kudu/util/countdown_latch.h M src/kudu/util/maintenance_manager.cc M src/kudu/util/monotime.cc M src/kudu/util/monotime.h M src/kudu/util/pstack_watcher.cc M src/kudu/util/threadpool.cc 14 files changed, 90 insertions(+), 93 deletions(-) Approvals: Kudu Jenkins: Verified Todd Lipcon: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/9572 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie2d3d0d9d84c3b1a76f3efc8ae706ddcaa455630 Gerrit-Change-Number: 9572 Gerrit-PatchSet: 4 Gerrit-Owner: Adar Dembo <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <[email protected]>
