Make `signalTSem` resilient against `Int` overflows
authorHerbert Valerio Riedel <hvr@gnu.org>
Thu, 28 Dec 2017 09:19:07 +0000 (10:19 +0100)
committerHerbert Valerio Riedel <hvr@gnu.org>
Thu, 28 Dec 2017 09:19:07 +0000 (10:19 +0100)
commita39a7ec5948a3411c8f3b18f25a2c63fbb57c8c3
tree5972df73c57a49a08aef43fd6a831e5d25664c02
parentf01196fdad645852d11a05b5fa244dabab76c685
Make `signalTSem` resilient against `Int` overflows

This is accomplished by switching the internal implementation to using
an 'Integer' value for the internal counter value which can never
overflow; the small computational overhead is assumed be neglectable
in the context of STM transaction overheads.

`waitTSem` was never affected as it already blocks when the counter
becomes non-positive.
Control/Concurrent/STM/TSem.hs
changelog.md