MCPcopy Create free account
hub / github.com/Snapchat/Valdi / setJsQueuePaused

Function setJsQueuePaused

valdi/test/integration/JSIntegrationTests.cpp:921–928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

919};
920
921void setJsQueuePaused(JSContextWrapper& wrapper, const Shared<TestSemaphore<bool>>& semaphore, bool paused) {
922 semaphore->setValue(paused);
923
924 if (paused) {
925 // Enqueue a block that will lock the thread
926 wrapper.getDispatchQueue()->async([=]() { semaphore->waitForValue(false); });
927 }
928}
929
930TEST_P(JSContextFixture, canCallFunctionThrottled) {
931 SKIP_IF_V8("Ticket: 2259");

Callers 1

TEST_PFunction · 0.85

Calls 4

getDispatchQueueMethod · 0.80
waitForValueMethod · 0.80
setValueMethod · 0.45
asyncMethod · 0.45

Tested by

no test coverage detected