53882ab4a7
Rather than limiting it to PerformStage and CleanupStage, this opens it up so any number of stages can be added as needed by commands. Each concurrent command has a set of stages that it uses, and only transitions between those can block waiting for a free slot in the worker pool. Calling enteringStage for some other stage does not block, and has very little overhead. Note that while before the Annex state was duplicated on the first call to commandAction, this now happens earlier, in startConcurrency. That means that seek stage actions should that use startConcurrency and then modify Annex state won't modify the state of worker threads they then start. I audited all of them, and only Command.Seek did so; prepMerge changes the working directory and so has to come before startConcurrency. Also, the remote list is built before duplicating the state, which means that it gets built earlier now than it used to. This would only have an effect of making commands that end up not needing to perform any actions unncessary build the remote list (only when they're run with concurrency enable), but that's a minor overhead compared to commands seeking through the work tree and determining they don't need to do anything. |
||
---|---|---|
.. | ||
GitAnnex | ||
GitAnnexShell | ||
Action.hs | ||
Batch.hs | ||
GitAnnex.hs | ||
GitAnnexShell.hs | ||
GitRemoteTorAnnex.hs | ||
GlobalSetter.hs | ||
Option.hs | ||
Seek.hs | ||
Usage.hs |