diff options
author | Dmitri Smirnov <dmitrism@microsoft.com> | 2017-02-06 14:43:55 -0800 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2017-02-06 14:54:18 -0800 |
commit | 0a4cdde50a2280c4aecd66ed430ce112bfed6933 (patch) | |
tree | 6c9fcbcd259d4f084fa04551fe65c1561885d3fe /db/write_callback_test.cc | |
parent | 1aaa898cf13d435e53e434db713f17afddaf28ce (diff) |
Windows thread
Summary:
introduce new methods into a public threadpool interface,
- allow submission of std::functions as they allow greater flexibility.
- add Joining methods to the implementation to join scheduled and submitted jobs with
an option to cancel jobs that did not start executing.
- Remove ugly `#ifdefs` between pthread and std implementation, make it uniform.
- introduce pimpl for a drop in replacement of the implementation
- Introduce rocksdb::port::Thread typedef which is a replacement for std::thread. On Posix Thread defaults as before std::thread.
- Implement WindowsThread that allocates memory in a more controllable manner than windows std::thread with a replaceable implementation.
- should be no functionality changes.
Closes https://github.com/facebook/rocksdb/pull/1823
Differential Revision: D4492902
Pulled By: siying
fbshipit-source-id: c74cb11
Diffstat (limited to 'db/write_callback_test.cc')
-rw-r--r-- | db/write_callback_test.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/db/write_callback_test.cc b/db/write_callback_test.cc index 8e167b4ba..a59281f12 100644 --- a/db/write_callback_test.cc +++ b/db/write_callback_test.cc @@ -14,6 +14,7 @@ #include "db/write_callback.h" #include "rocksdb/db.h" #include "rocksdb/write_batch.h" +#include "port/port.h" #include "util/logging.h" #include "util/sync_point.h" #include "util/testharness.h" @@ -241,7 +242,7 @@ TEST_F(WriteCallbackTest, WriteWithCallbackTest) { rocksdb::SyncPoint::GetInstance()->EnableProcessing(); // do all the writes - std::vector<std::thread> threads; + std::vector<port::Thread> threads; for (uint32_t i = 0; i < write_group.size(); i++) { threads.emplace_back(write_with_callback_func); } |