summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/Disk.hs
diff options
context:
space:
mode:
authorJochen Keil <jochen.keil@gmail.com>2012-08-14 20:34:05 +0200
committerJochen Keil <jochen.keil@gmail.com>2012-08-14 20:34:05 +0200
commit81289a1382f901b11320130f8a9c07e593a468f3 (patch)
tree1534a4a16ffbb4f843eb4337a15d3b15f082d747 /src/Plugins/Monitors/Disk.hs
parent6af9700dd0f7a4fd8b8ad0a302e52e8bfb3f2344 (diff)
downloadxmobar-81289a1382f901b11320130f8a9c07e593a468f3.tar.gz
xmobar-81289a1382f901b11320130f8a9c07e593a468f3.tar.bz2
Bugfix: Replace the TMVar String with a TVar (Maybe String)
The problem was a race condition which occured when running multiple threads with a small timeout value. Then the TMVar could be left empty. (e.g. hitting a key which causes an operation to write to the pipe very fast) This meant that tryTakeTMVar would return Nothing which would cause all subsequent reset threads to not call cb and keep a stale string on display. By using a Maybe String wrapped in a TVar there is always a valid value available which can be used to restore the display (or not if it's Nothing, but that's desired then and not because another thread was scheduled earlier).
Diffstat (limited to 'src/Plugins/Monitors/Disk.hs')
0 files changed, 0 insertions, 0 deletions