librelist archives

« back to archive

Concurrent command execution

Concurrent command execution

John Peberdy
2012-05-13 @ 19:32
Hi all,

I've implemented command server pooling so a repository can have
multiple Servers while sharing the changeset cache. The main use case
for MercurialEclipse is invoking long running command like incoming,
pull, etc while doing other stuff like looking at history.  The
default concurrency is 1 and can be increased using

Also added the ability to cancel a long-running command -
AbstractCommand.cancel(). I haven't implemented command execution
timeouts like we discussed but for now the user can manually cancel
stalled commands.

Let me know if you have questions or concerns.

I'd be interested if you have opinions on these two issues:
1. JavaHg uses a lot of threads. Should the watcher threads be
aggregated globally? (per Repository or ServerPool wouldn't be that
2. Currently the caller is responsible for not executing commands that
don't make sense to do at the same time. For example what
StressTest.stressTest() does. Maybe in the future we want to serialize
commands that write to the repository. I will see if this is an issue
in practice.