summaryrefslogtreecommitdiff
path: root/Omni/Log/Concurrent.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2025-11-15 13:30:04 -0500
committerBen Sima <ben@bsima.me>2025-11-15 13:30:04 -0500
commitd2253e15dd405b3fbf15663aa02ab1f5ffa56306 (patch)
tree167d0f7568f8b9d59371880889686f4b6b2ced21 /Omni/Log/Concurrent.hs
parent7384d1297dbf6929063e6d3f15f7903a4d20e5ef (diff)
Improve terminalLock comment for clarity
Clarify that the mutex protects against ncurses thread-safety issues that cause segfaults during concurrent builds. This commit also forces a new Nix derivation hash to ensure the mutex fix is actually used (previous builds were cached with the old version).
Diffstat (limited to 'Omni/Log/Concurrent.hs')
-rw-r--r--Omni/Log/Concurrent.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Omni/Log/Concurrent.hs b/Omni/Log/Concurrent.hs
index b43c8ef..d4969eb 100644
--- a/Omni/Log/Concurrent.hs
+++ b/Omni/Log/Concurrent.hs
@@ -43,7 +43,8 @@ namespaceLines :: IORef (Map Namespace Int)
namespaceLines = unsafePerformIO (newIORef Map.empty)
-- | Global lock for all terminal operations
--- ANSI terminal library is not thread-safe, so we must serialize all calls
+-- ANSI terminal library (ncurses) is not thread-safe, so we must serialize all calls
+-- to prevent segfaults during concurrent builds
{-# NOINLINE terminalLock #-}
terminalLock :: MVar ()
terminalLock = unsafePerformIO (newMVar ())