Fix deadlock when there are multiple inputs to simulation.
Merge branch 'memory' of github.com:joewing/ScalaPipe into memory