Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document that Data.ByteString.Lazy.appendFile is not threadsafe. #675

Open
NorfairKing opened this issue Apr 16, 2024 · 0 comments
Open

Comments

@NorfairKing
Copy link

NorfairKing commented Apr 16, 2024

ghci> :set -XOverloadedStrings
ghci> import Control.Concurrent.Async
ghci> import qualified Data.ByteString.Lazy as LB
ghci> import qualified Data.ByteString as SB
ghci> let act = LB.appendFile "/tmp/file.log" "hello!" in concurrently_ act act
*** Exception: /tmp/file.log: openBinaryFile: resource busy (file is locked)
ghci> let act = SB.appendFile "/tmp/file.log" "hello!" in concurrently_ act act
ghci>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant