flushTQueue: only perform writeTVar when necessary
authorBas van Dijk <v.dijk.bas@gmail.com>
Tue, 20 Mar 2018 21:31:36 +0000 (22:31 +0100)
committerBas van Dijk <v.dijk.bas@gmail.com>
Tue, 20 Mar 2018 21:31:36 +0000 (22:31 +0100)
commita77aae736a98a605dedc4669d8a4cc55fb2d160e
tree67ece8ff06f3124a58d49966a2dcdc2ee2f9a24f
parent5ea70d4e15d461888866796a164bf9c177a1e8b8
flushTQueue: only perform writeTVar when necessary

To prevent unnecessarily invalidating other transactions writeTVar
must only be called when its contents should actually be changed.
Control/Concurrent/STM/TQueue.hs