Optimise wakeups for STM
authorSimon Marlow <marlowsd@gmail.com>
Sun, 15 Jul 2018 00:02:03 +0000 (20:02 -0400)
committerBen Gamari <ben@smart-cactus.org>
Sun, 15 Jul 2018 00:02:42 +0000 (20:02 -0400)
commit502640c90c3d0fbb6c46257be14fdc7e3c694c6c
tree7242561a0b69807b2c2dc9d4488d12befe10e877
parent0905fec089b3270f540c7ee33959cbf8ecfcb4d7
Optimise wakeups for STM

Avoids repeated wakeup messages being sent when a TVar is written to
multiple times. See comments for details.

Test Plan:
* Test from #15136 (will be added to stm shortly)
* existing stm tests

Reviewers: bgamari, osa1, erikd

Reviewed By: bgamari

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #15136

Differential Revision: https://phabricator.haskell.org/D4961
rts/STM.c