main: avoid resourceLoaded() deadlock (fixes #9)
swarm: try to avoid deadlocks and zombie intervals (refs #9)