diff options
author | Jochen Keil <jochen.keil@gmail.com> | 2012-08-22 20:25:29 +0200 |
---|---|---|
committer | Jochen Keil <jochen.keil@gmail.com> | 2012-08-22 20:25:29 +0200 |
commit | 68f9f51cd7e20190e1ef2fd95beaf7c852f11c81 (patch) | |
tree | 666f67f41cde4a7ab9a3ea5d59a9ad22854e45a3 /src/Config.hs | |
parent | d52278f48d98f116d3a1ebd21000bf80d90b8c9d (diff) | |
download | xmobar-68f9f51cd7e20190e1ef2fd95beaf7c852f11c81.tar.gz xmobar-68f9f51cd7e20190e1ef2fd95beaf7c852f11c81.tar.bz2 |
Refactor MVar SignalType to TMVar SignalType
Replace MVar with TMVar from the STM package. This is common for ghc
now. Since STM is used everywhere else in the src it also adds no
additional dependencies.
The main reason for this switch is, that readMVar, swapMVar, etc. are
only atomically if there is no other producer for this MVar i.e.
putMVar. For example readMVar is a combination of putMVar and takeMVar.
Due to scheduling and readMVar's non-atomicity it is possible that
values written to the MVar appear in the wrong order.
Using TMVar fixes this problem, since it allows really atomical
read/swap operations.
Diffstat (limited to 'src/Config.hs')
0 files changed, 0 insertions, 0 deletions