Open fintara opened 1 year ago
Similarly to Broadcast's listenTimeout, it may be useful to have:
listenTimeout
acquireTimeout :: Lock -> Integer -> IO Bool
withTimeout :: Lock -> Integer -> IO a -> IO (Maybe a)
that try to acquire the lock in the provided time or fail (returning False and Nothing correspondingly).
False
Nothing
Is there a technical/logical limitation for this not to work? Is using timeout with acquire really undesirable?
timeout
acquire
Similarly to Broadcast's
listenTimeout
, it may be useful to have:acquireTimeout :: Lock -> Integer -> IO Bool
andwithTimeout :: Lock -> Integer -> IO a -> IO (Maybe a)
that try to acquire the lock in the provided time or fail (returning
False
andNothing
correspondingly).Is there a technical/logical limitation for this not to work? Is using
timeout
withacquire
really undesirable?