From 20203b45b9dbf915851969b9c5f4c9cb6e71acb6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 8 Aug 2012 17:55:56 -0400 Subject: 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. --- Assistant/TransferSlots.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Assistant/TransferSlots.hs') 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 -- cgit v1.2.3