Skip to content

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

@NorfairKing

Description

@NorfairKing
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

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