remove uses of warningIO
It's not concurrent-output safe, and doesn't support --json-error-messages. Using Annex.makeRunner is a bit scary, because what if it's run in a different thread from an active annex action? Normally the same Annex state is not used concurrently in several threads, and it's not designed to be fully concurrency safe. (Annex.Concurrent exists to deal with that.) I think it will be ok in these simple cases though. Eg, when buffering a warning message to json, Annex.changeState is used, and it modifies the MVar in a concurrency safe way. The only warningIO remaining is not a problem.
This commit is contained in:
parent
1858b65d88
commit
63839532c9
5 changed files with 28 additions and 22 deletions
|
@ -619,7 +619,8 @@ startExternal external =
|
|||
`onException` store UncheckedExternalAsync
|
||||
if asyncExtensionEnabled extensions
|
||||
then do
|
||||
relay <- liftIO $ runRelayToExternalAsync external st
|
||||
annexrunner <- Annex.makeRunner
|
||||
relay <- liftIO $ runRelayToExternalAsync external st annexrunner
|
||||
st' <- liftIO $ asyncRelayExternalState relay
|
||||
store (ExternalAsync relay)
|
||||
return st'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue