AV
r <- newEmptyTMVarIO
atomically $ do
readTVar cache >>= \case
Nothing -> writeTVar cache r >> pure (try action >>= atomically (writeTMVar r))
Just x -> pure (throwOnLeft $ atomically $ readTMVar x)
Size: a a a
AV
r <- newEmptyTMVarIO
atomically $ do
readTVar cache >>= \case
Nothing -> writeTVar cache r >> pure (try action >>= atomically (writeTMVar r))
Just x -> pure (throwOnLeft $ atomically $ readTMVar x)
AV
AV
AV
MK
AV
к
AV
YS
YS
YS
MK
AV
YS
YS