summaryrefslogtreecommitdiff
path: root/Assistant/BranchChange.hs
blob: b166c87778c91f1d5ecb38c7d9b550b572d29961 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{- git-annex assistant git-annex branch change tracking
 -
 - Copyright 2012 Joey Hess <joey@kitenet.net>
 -
 - Licensed under the GNU GPL version 3 or higher.
 -}

module Assistant.BranchChange where

import Control.Concurrent.MSampleVar

type BranchChangeHandle = MSampleVar ()

newBranchChangeHandle :: IO BranchChangeHandle
newBranchChangeHandle = newEmptySV

branchChanged :: BranchChangeHandle -> IO ()
branchChanged = flip writeSV ()

waitBranchChange :: BranchChangeHandle -> IO ()
waitBranchChange = readSV