rocksdb/port/win
Andrew Kryczka e373685dab Add SystemClock::TimedWait() function (#11753)
Summary:
Having a synthetic implementation of `TimedWait()` in `SystemClock` will allow us to add `SyncPoint`s while mutex is released, which was previously impossible since the lock was released and reacquired all within `pthread_cond_timedwait()`. Additionally, integrating `TimedWait()` with `MockSystemClock` allows us to cleanup some workarounds in the test code. In this PR I only cleaned up the `GenericRateLimiter` test workaround.

This is related to the intended follow-up mentioned in https://github.com/facebook/rocksdb/issues/7101's description. There are a couple differences:

(1) This PR does not include removing the particular workaround that initially motivated it. Actually, the `Timer` class uses `InstrumentedCondVar`, so the interface introduced here is inadequate to remove that workaround. On the bright side, the interface introduced in this PR can be changed as needed since it can neither be used nor extended externally, due to using forward-declared `port::CondVar*` in the interface.
(2) This PR only makes the change in `SystemClock` not `Env`. Older revisions of this PR included `Env::TimedWait()` and `SpecialEnv::TimedWait()`; however, since they were unused it probably makes sense to defer adding them until when they are needed.

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

Reviewed By: pdillinger

Differential Revision: D48654995

Pulled By: ajkr

fbshipit-source-id: 15e19f2454b64d4ec7f50e328691c66ca9911122
2023-08-29 18:39:10 -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 Add an interface to provide support for underlying FS to pass their own buffer during reads (#11324) 2023-06-23 11:48:49 -07:00
io_win.cc Fix GetWindowsErrSz nullptr bug (#10282) 2022-06-29 20:41:54 -07:00
io_win.h clang format files under port/ (#10849) 2022-10-24 16:56:01 -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 Add SystemClock::TimedWait() function (#11753) 2023-08-29 18:39:10 -07:00
win_jemalloc.cc clang format files under port/ (#10849) 2022-10-24 16:56:01 -07:00
win_logger.cc clang format files under port/ (#10849) 2022-10-24 16:56:01 -07:00
win_logger.h clang format files under port/ (#10849) 2022-10-24 16:56:01 -07:00
win_thread.cc clang format files under port/ (#10849) 2022-10-24 16:56:01 -07:00
win_thread.h clang format files under port/ (#10849) 2022-10-24 16:56:01 -07:00
xpress_win.cc clang format files under port/ (#10849) 2022-10-24 16:56:01 -07:00
xpress_win.h clang format files under port/ (#10849) 2022-10-24 16:56:01 -07:00