The on() block is the unit of synchronisation, one on() block will wait for all servers to complete before it returns.
-- SSHKit README.md
If you can send me some pseudo code of what you wanted to work, I'd be more than glad to try and go a bit deeper, it's also worth pointing out that there's a pretty decent split between the task structure (`namespace`/`task` from Rake, which makes up the Capistrano DSL) and the underlying do something on a server code (SSHKit) ... the latter should be threadsafe as the parallel() helpers in SSHKit make liberal use of threads...
What I'm trying to say is:
- You can:
- Write your own classes (and, test them!)
- Avoid our synchronisation primitives and use threads if ours don't work
I hope that helps, but I must admit that a handful of lines of pseudo code from your end would raise my confidence factor in making suggestions 10x.
Cheers, Lee