From 9c274b08e0cecdaf80884993b77090f250220ef5 Mon Sep 17 00:00:00 2001 From: Stevan Andjelkovic Date: Mon, 21 Mar 2022 13:26:21 +0100 Subject: [PATCH] fix(journal): add sleep to avoid spin loop on macos --- src/journal/src/Journal/MP.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/journal/src/Journal/MP.hs b/src/journal/src/Journal/MP.hs index c3f18eb6..03c2388f 100644 --- a/src/journal/src/Journal/MP.hs +++ b/src/journal/src/Journal/MP.hs @@ -217,6 +217,7 @@ readManyJournalSC jour sub state0 process = do state' <- process state bs incrBytesConsumed_ (jMetadata jour) sub (align (int322Int len) fRAME_ALIGNMENT) + threadDelay 1 go (steps + 1) (offset + align (int322Int len) fRAME_ALIGNMENT) position state' readManyLazyJournalSC :: forall s. Journal -> Subscriber -> s -> (s -> LBS.ByteString -> IO s)