haskell-phrasebook
haskell-phrasebook copied to clipboard
Add example for threadsafe logging.
Re: https://github.com/typeclasses/haskell-phrasebook/issues/14
Re: https://github.com/typeclasses/haskell-phrasebook/issues/15, too.
Finally getting back to this :sweat:
When run as an executable, not all the log messages get printed, because main doesn't join to the "sing" threads, so it quits before they finish. I'm considering using the async package instead of forkIO so we can have an easy facility to wait for thread termination.
(log, print) <- do
I probably shouldn't be shadowing Prelude symbols, either 🙃
I'll play with this today and push what i end up with.
Hey, good to hear from you! Check out my PR, I've had some other thoughts as well.