Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data DNSSemaphore (m :: Type -> Type)
- newLedgerAndPublicRootDNSSemaphore :: MonadSTM m => m (DNSSemaphore m)
- newDNSLocalRootSemaphore :: forall (m :: Type -> Type). MonadSTM m => STM m (DNSSemaphore m)
- withDNSSemaphore :: (MonadSTM m, MonadThrow m) => DNSSemaphore m -> m a -> m a
DNS semaphore
data DNSSemaphore (m :: Type -> Type) Source #
A semaphore used to limit concurrency of dns names resolution.
newLedgerAndPublicRootDNSSemaphore :: MonadSTM m => m (DNSSemaphore m) Source #
Create a DNSSemaphore
for root and ledger peers.
newDNSLocalRootSemaphore :: forall (m :: Type -> Type). MonadSTM 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