Add timed_wait and try_wait to Baton
authorSarang Masti <mssarang@fb.com>
Thu, 31 Jul 2014 00:45:16 +0000 (17:45 -0700)
committerSara Golemon <sgolemon@fb.com>
Thu, 14 Aug 2014 18:49:04 +0000 (11:49 -0700)
commita3b85e00633ea9f955abaa4114e92023ee94494b
tree8d6bd54ab077a6669fdba84d4da357a46d55156f
parent297d5cee109992e5101fbf353bbd04e2a5704c39
Add timed_wait and try_wait to Baton

Summary:
This diff adds timed_wait that allows waiting on the Baton
with a timeout. The diff also adds try_wait which doesn't
block the thread at all.

Test Plan:
-- added new unit tests
-- ran all folly tests

Reviewed By: ngbronson@fb.com

Subscribers: bwatling

FB internal diff: D1468909

Tasks: 4679428
folly/Baton.h
folly/test/BatonTest.cpp