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

Make putStrLn more atomic with line or block buffering #600

Merged
merged 3 commits into from
Jun 2, 2024

Conversation

Lysxia
Copy link
Contributor

@Lysxia Lysxia commented May 29, 2024

Fixes #442 and #242. Subsumes #592. (no longer, see #603 instead)

This imitates the behavior in base by making the newline part of the chunk.

@Lysxia Lysxia force-pushed the atomic-putStrLn branch 2 times, most recently from c7c73e3 to 7bbbe59 Compare May 29, 2024 21:17
src/Data/Text/Lazy/IO.hs Outdated Show resolved Hide resolved
@Lysxia Lysxia force-pushed the atomic-putStrLn branch 3 times, most recently from c7c73e3 to b5ea464 Compare May 29, 2024 21:47
src/Data/Text/Lazy/IO.hs Outdated Show resolved Hide resolved
src/Data/Text/Internal/Fusion.hs Outdated Show resolved Hide resolved
src/Data/Text/IO.hs Outdated Show resolved Hide resolved
@Bodigrim Bodigrim linked an issue Jun 2, 2024 that may be closed by this pull request
@Bodigrim Bodigrim merged commit b500f08 into haskell:master Jun 2, 2024
28 checks passed
@Bodigrim
Copy link
Contributor

Bodigrim commented Jun 2, 2024

Very nice!

@domenkozar
Copy link

Thank you!

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

Successfully merging this pull request may close these issues.

hPutStrLn in multiple threads putStrLn doesn't work correctly with LineBuffering
4 participants