aboutsummaryrefslogtreecommitdiff
path: root/Assistant/TransferSlots.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-08-08 17:55:56 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-08-08 17:55:56 -0400
commit20203b45b9dbf915851969b9c5f4c9cb6e71acb6 (patch)
tree62b352950dd0f044f1b5aaee9baa4af2e02d80fd /Assistant/TransferSlots.hs
parent09449792fa50686e2fb9af6c392b8644dddae5d6 (diff)
transfer canceling
Should work (untested) for transfers being run by other processes. Not yet by transfers being run by the assistant. killThread does not kill processes forked off by a thread. To fix this, will probably need to make `git annex getkey` and `git annex sendkey` commands that operate on keys, and write their own transfer info. Then the assistant can run them, and kill them, as needed.
Diffstat (limited to 'Assistant/TransferSlots.hs')
-rw-r--r--Assistant/TransferSlots.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Assistant/TransferSlots.hs b/Assistant/TransferSlots.hs
index 710a18884..9556232a4 100644
--- a/Assistant/TransferSlots.hs
+++ b/Assistant/TransferSlots.hs
@@ -27,7 +27,8 @@ newTransferSlots :: IO TransferSlots
newTransferSlots = newQSemN numSlots
{- Waits until a transfer slot becomes available, and runs a transfer
- - action in the slot, in its own thread. -}
+ - action in the slot, in its own thread. Note that this thread is
+ - subject to being killed when the transfer is canceled. -}
inTransferSlot :: TransferSlots -> ThreadState -> Annex a -> IO ThreadId
inTransferSlot s st a = do
waitQSemN s 1