diff options
author | Yi Wu <yiwu@fb.com> | 2018-09-27 15:25:47 -0700 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2018-09-27 15:28:00 -0700 |
commit | d6f2ecf49c28fee225477d39e2a1535a87919afe (patch) | |
tree | 82318a0ae9b821efb43dc08ab18a251d07574b26 /TARGETS | |
parent | 75ca13875c0847ef89805274677fbfb7375a7a95 (diff) |
Utility to run task periodically in a thread (#4423)
Summary:
Introduce `RepeatableThread` utility to run task periodically in a separate thread. It is basically the same as the the same class in fbcode, and in addition provide a helper method to let tests mock time and trigger execution one at a time.
We can use this class to replace `TimerQueue` in #4382 and `BlobDB`.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4423
Differential Revision: D10020932
Pulled By: yiwu-arbug
fbshipit-source-id: 3616bef108c39a33c92eedb1256de424b7c04087
Diffstat (limited to 'TARGETS')
-rw-r--r-- | TARGETS | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -936,6 +936,11 @@ ROCKS_TESTS = [ "serial", ], [ + "repeatable_thread_test", + "util/repeatable_thread_test.cc", + "serial", + ], + [ "sim_cache_test", "utilities/simulator_cache/sim_cache_test.cc", "serial", |