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

Concurrent logging #41

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Concurrent logging #41

wants to merge 5 commits into from

Conversation

chris-martin
Copy link
Member

Proposed modifications to #40

friedbrice and others added 5 commits February 22, 2022 15:12
Use concurrently_ and forConcurrently_ from the async package instead
of forkIO.

Use a TVar to tell the printing thread when to stop instead of just
stopping when the queue is empty, because an empty queue doesn't
necessarily mean nothing else will get logged.

Use a continuation passing style to obtain the concurrent log action,
because this is encouraged by the async package to ensure that all
threads get canceled in the event of an exception.
but why is the unsynchronized output not jumbled up anymore?
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.

2 participants