summaryrefslogtreecommitdiff
path: root/Assistant.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-28 18:02:11 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-07-28 18:02:11 -0400
commit3cc18857936e5a09e033439971dc9c43e6ccbaa2 (patch)
treea817de04aa65271b3036370d447cf1b228a4bffb /Assistant.hs
parenta17fde22fabdb706086ac945bc331e32527b58bd (diff)
move DaemonStatus manipulation out of the Annex monad to IO
I've convinced myself that nothing in DaemonStatus can deadlock, as it always keepts the TMVar full. That was the only reason it was in the Annex monad.
Diffstat (limited to 'Assistant.hs')
-rw-r--r--Assistant.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/Assistant.hs b/Assistant.hs
index ca428988f..6b25c3c6f 100644
--- a/Assistant.hs
+++ b/Assistant.hs
@@ -65,10 +65,8 @@
- Annex monad in IO actions run by the watcher and committer
- threads. Thus, a single state is shared amoung the threads, and
- only one at a time can access it.
- - DaemonStatusHandle: (MVar)
- - The daemon's current status. This MVar should only be manipulated
- - from inside the Annex monad, which ensures it's accessed only
- - after the ThreadState MVar.
+ - DaemonStatusHandle: (STM TMVar)
+ - The daemon's current status.
- ChangeChan: (STM TChan)
- Changes are indicated by writing to this channel. The committer
- reads from it.