26 using namespace folly;
57 using duration = std::chrono::steady_clock::duration;
58 using time_point = std::chrono::time_point<MockClock, duration>;
63 static std::shared_ptr<StrictMock<MockClock>>
setup() {
64 auto rv = std::make_shared<StrictMock<MockClock>>();
65 s_mockClockInstance = rv;
70 return s_mockClockInstance.lock()->nowImpl();
98 return futex->futexWait(expected, waitMask);
100 template <
typename Clock,
typename Duration>
104 std::chrono::time_point<Clock, Duration>
const& deadline,
106 return futex->futexWaitUntil(expected, deadline, waitMask);
180 fut, 2,
forever, 0xff, std::chrono::seconds(0)));
192 fut, 1,
forever, -1, std::chrono::seconds(-7)));
static FutexResult futexWaitUntil(Futex &fut, uint32_t expected, Deadline const &deadline, uint32_t waitMask=-1, IdleTime const &idleTimeout=defaultIdleTimeout.load(std::memory_order_acquire), size_t stackToRetain=kDefaultStackToRetain, float timeoutVariationFrac=0.5)
static void unmapUnusedStack(size_t retain=kDefaultStackToRetain)
#define EXPECT_EQ(val1, val2)
static std::weak_ptr< StrictMock< MockClock > > s_mockClockInstance
static auto const forever
Atom< std::uint32_t > Futex
auto begin(TestAdlIterable &instance)
T load(std::memory_order mo=std::memory_order_seq_cst) const noexcept
—— Concurrent Priority Queue Implementation ——
FutexResult futexWait(const Futex *futex, uint32_t expected, uint32_t waitMask)
internal::LtMatcher< Rhs > Lt(Rhs x)
void init(int *argc, char ***argv, bool removeFlags)
FutexResult futexWaitUntil(const Futex *futex, uint32_t expected, std::chrono::time_point< Clock, Duration > const &deadline, uint32_t waitMask)
#define MOCK_CONST_METHOD3(m,...)
static std::shared_ptr< StrictMock< MockClock > > setup()
Hold on to the returned shared_ptr until the end of the test.
StrictConjunction< T< As >... > AllOf
std::chrono::steady_clock::duration duration
static AtomicStruct< std::chrono::steady_clock::duration > defaultIdleTimeout
#define MOCK_CONST_METHOD2(m,...)
#define EXPECT_CALL(obj, call)
internal::GeMatcher< Rhs > Ge(Rhs x)
std::chrono::steady_clock::time_point time_point
TEST(SequencedExecutor, CPUThreadPoolExecutor)
static void flushLocalMallocCaches()
internal::ReturnAction< R > Return(R value)
#define MOCK_METHOD0(m,...)