[ANN] ki-1.0.0.2 fixes a small correctness bug

Hi all,

Some context: ki is a lightweight structured concurrency library. You can find a previous release announcement here on Discourse or here on Reddit

@tristanC has discovered a small correctness bug affecting ki-1.0.0 and ki-1.0.0.1; now ki-1.0.0.2 has been uploaded to Hackage, the only version not known to contain any bugs :wink:

In short, a child thread that throws an exception during cleanup induced by its scope closing would likely fail to propagate its exception, leading to deadlock (usually if not always detected by the GHC runtime, which would then blast out BlockedIndefinitelyOnSTM exceptions).

Here is the issue: Nested scope stuck on Data.ByteString.hGetLine · Issue #19 · awkward-squad/ki · GitHub
And the patch: fix issue #19: deadlock by mitchellwrosen · Pull Request #20 · awkward-squad/ki · GitHub

Please update your dependencies accordingly and happy new year!

5 Likes

Thank you for the update! I have to say that the maintainers fixed my bug in less than a day, while providing extensive details about what went wrong. I learned about structured concurrency through a previous release of ki, and I haven’t looked back since then :slight_smile: