ouroboros-network- A networking layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred



DNS semaphore

data DNSSemaphore m Source #

A semaphore used to limit concurrency of dns names resolution.

newLedgerAndPublicRootDNSSemaphoreMonadSTM m ⇒ m (DNSSemaphore m) Source #

Create a DNSSemaphore for root and ledger peers.

newDNSLocalRootSemaphoreMonadSTM m ⇒ STM m (DNSSemaphore m) Source #

Create a DNSSemaphore for local root peers.

withDNSSemaphore ∷ (MonadSTM m, MonadThrow m) ⇒ DNSSemaphore m → m a → m a Source #

Run a computation by attempting to acquire the semaphore first. On termination or failure free the semaphore