diff options
author | Joey Hess <joey@kitenet.net> | 2012-08-08 17:55:56 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-08-08 17:55:56 -0400 |
commit | 20203b45b9dbf915851969b9c5f4c9cb6e71acb6 (patch) | |
tree | 62b352950dd0f044f1b5aaee9baa4af2e02d80fd /Assistant/TransferSlots.hs | |
parent | 09449792fa50686e2fb9af6c392b8644dddae5d6 (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.hs | 3 |
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 |