user-defined expirations
authorJames Sedgwick <jsedgwick@fb.com>
Tue, 23 Sep 2014 18:17:03 +0000 (11:17 -0700)
committerAnton Likhtarov <alikhtarov@fb.com>
Fri, 26 Sep 2014 22:22:51 +0000 (15:22 -0700)
commit395c7e78e17e9521fcb9b8e3474d7ff17095b3ac
treef964cc1c4f9b6a11393d337e51915d1c3f578be0
parent39d6939c8a5e2ab5bb6ab780dd4db5fce3ed3fbe
user-defined expirations

Summary:
Couple of notes:
1. is it a bummer not to have per-task callbacks of some kind? the interfaces set up here only tell you that some task expired, not which one expired. TM calls back with the Runnable object. is that useful?
2. std::chrono::* business is frustratingly verbose, but the safety/explicitness is nice. Not sure how I feel overall.
3. perhaps expirations should be given in microseconds even if we don't think we can accurately accomplish that

Test Plan: added unit

Reviewed By: hans@fb.com

Subscribers: fugalh, njormrod, bmatheny

FB internal diff: D1563520
folly/experimental/wangle/concurrent/CPUThreadPoolExecutor.cpp
folly/experimental/wangle/concurrent/CPUThreadPoolExecutor.h
folly/experimental/wangle/concurrent/IOThreadPoolExecutor.cpp
folly/experimental/wangle/concurrent/IOThreadPoolExecutor.h
folly/experimental/wangle/concurrent/ThreadPoolExecutor.cpp
folly/experimental/wangle/concurrent/ThreadPoolExecutor.h
folly/experimental/wangle/concurrent/test/ThreadPoolExecutorTest.cpp