Skip to content

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

Open
@NorfairKing

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>

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions