arbiter-test-0.1.0.0
arbiter-test
Safe HaskellNone
LanguageGHC2024

Arbiter.Test.Poll

Description

Polling helpers for tests.

Synopsis

Documentation

waitUntil :: HasCallStack => Int -> IO Bool -> IO ()Source #

Poll every pollIntervalMs until the predicate returns True. Fails with expectationFailure after timeoutMs milliseconds.

withLinkedAsync :: MonadUnliftIO m => m a -> (Async a -> m b) -> m bSource #

Run withAsync with a linked handle. Raise a child-thread failure in the caller and stop the associated waitUntil.

bumpRef :: Num a => IORef a -> IO ()Source #

Add one to a counter.