rocksdb/port/win
zczhu 96206531bc Support reservation in thread pool (#10278)
Summary:
Add `ReserveThreads` and `ReleaseThreads` functions in thread pool to support reservation in for a specific thread pool.  With this feature, a thread will be blocked if the number of waiting threads (noted by `num_waiting_threads_`) equals the number of reserved threads (noted by `reserved_threads_`), normally `reserved_threads_` is upper bounded by `num_waiting_threads_`; in rare cases (e.g. `SetBackgroundThreadsInternal` is called when some threads are already reserved), `num_waiting_threads_` can be less than `reserved_threads`.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10278

Test Plan: Add `ReserveThreads` unit test in `env_test`. Update the unit test `SimpleColumnFamilyInfoTest` in `thread_list_test` with adding `ReserveThreads` related assertions.

Reviewed By: hx235

Differential Revision: D37640946

Pulled By: littlepig2013

fbshipit-source-id: 4d691f6b9a433569f96ab52d52c3defe5b065367
2022-07-08 19:48:09 -07:00
..
env_default.cc Remove using namespace (#9369) 2022-01-12 09:31:12 -08:00
env_win.cc Support reservation in thread pool (#10278) 2022-07-08 19:48:09 -07:00
env_win.h Support reservation in thread pool (#10278) 2022-07-08 19:48:09 -07:00
io_win.cc Fix GetWindowsErrSz nullptr bug (#10282) 2022-06-29 20:41:54 -07:00
io_win.h Explicitly closing all directory file descriptors (#10049) 2022-06-01 18:03:34 -07:00
port_win.cc Fix potential ambiguities in/around port/sys_time.h (#10045) 2022-05-24 18:20:17 -07:00
port_win.h Use optimized folly DistributedMutex in LRUCache when available (#10179) 2022-06-17 13:08:45 -07:00
win_jemalloc.cc Remove code that only compiles for Visual Studio versions older than 2015 (#10065) 2022-05-26 16:55:08 -07:00
win_logger.cc Fix potential ambiguities in/around port/sys_time.h (#10045) 2022-05-24 18:20:17 -07:00
win_logger.h Use SystemClock* instead of std::shared_ptr<SystemClock> in lower level routines (#8033) 2021-03-15 04:34:11 -07:00
win_thread.cc Fix incorrect order of comments in win_thread.cc (#9033) 2021-10-27 13:25:01 -07:00
win_thread.h Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
xpress_win.cc Introduce a helper method UncompressData (#7434) 2020-09-25 09:01:45 -07:00
xpress_win.h Introduce a helper method UncompressData (#7434) 2020-09-25 09:01:45 -07:00