diff options
author | Joey Hess <joey@kitenet.net> | 2012-08-10 14:14:08 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-08-10 14:14:08 -0400 |
commit | d5e06e7b89133d8178b604724a41d4a392d577cd (patch) | |
tree | 90ad011ece5890b5cc0ab9eca01e6d6dfb4a9141 /Assistant/ThreadedMonad.hs | |
parent | 2e1f3a86aec44337775b418b66bf9696146a49f2 (diff) |
fork off git-annex copy for transfers
This doesn't quite work, because canceling a transfer sends a signal
to git-annex, but not to rsync (etc).
Looked at making git-annex run in its own process group, which could then
be killed, and would kill child processes. But, rsync checks if it's
process group is the foreground process group and doesn't show progress if
not, and when git has run git-annex, if git-annex makes a new process
group, that is not the case. Also, if git has run git-annex, ctrl-c
wouldn't be propigated to it if it made a new process group.
So this seems like a blind alley, but recording it here just in case.
Diffstat (limited to 'Assistant/ThreadedMonad.hs')
-rw-r--r-- | Assistant/ThreadedMonad.hs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/Assistant/ThreadedMonad.hs b/Assistant/ThreadedMonad.hs index 1decd8e91..7b915e12c 100644 --- a/Assistant/ThreadedMonad.hs +++ b/Assistant/ThreadedMonad.hs @@ -36,14 +36,3 @@ withThreadState a = do - time. -} runThreadState :: ThreadState -> Annex a -> IO a runThreadState mvar a = modifyMVar mvar $ \state -> swap <$> Annex.run state a - -{- Runs an Annex action, using a copy of the state from the MVar. - - - - It's up to the action to perform any necessary shutdown tasks in order - - for state to not be lost. And it's up to the caller to resynchronise - - with any changes the action makes to eg, the git-annex branch. - -} -unsafeRunThreadState :: ThreadState -> Annex a -> IO () -unsafeRunThreadState mvar a = do - state <- readMVar mvar - void $ Annex.eval state a |