haskell / haskell/bytestring

Document that `Data.ByteString.Lazy.appendFile` is not threadsafe.

Open
#675 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
301
Forks
144
Avg merge
7d 22h
Merged PRs (30d)
1

Description

```
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>
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.