MemoryIdler::futexWaitUntil
authorYedidya Feldblum <yfeldblum@fb.com>
Thu, 11 Jan 2018 21:26:45 +0000 (13:26 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 11 Jan 2018 21:41:43 +0000 (13:41 -0800)
commitb1fe65ff984c0bee2ea0dcdb4aded475b5463315
treee64b3263784d5b3639639173cbcac6ebdb2de0b8
parent3d2b926a9897457fab52e96768ed9fca2c6dd3f3
MemoryIdler::futexWaitUntil

Summary:
[Folly] `MemoryIdler::futexWaitUntil`.

Adds `MemoryIdler::futexWaitUntil` that works like `Futex::futexWaitUntil`, in a similar way that `MemoryIdler::futexWait` works like `Futex::futexWait`.

Removes the ability to customize the idle-timeout clock for `MemoryIdler::futexWait` as a side-effect; the idle-timeout is now a pure duration. Now, the clock used with the idle-timeout is the same as the normal deadline clock, so the idle-timeout clock can be set for `MemoryIdler::futexWaitUntil` by providing a deadline with that clock type. This normally would not matter, but it affects the unit-tests.

Reviewed By: djwatson

Differential Revision: D6681679

fbshipit-source-id: e3cf6e71d7530c5877a834b318b423eb91f71eb9
folly/detail/MemoryIdler.h
folly/test/MemoryIdlerTest.cpp