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.
This commit is contained in:
parent
09449792fa
commit
20203b45b9
3 changed files with 34 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue