madrobby / scripty2

scripty2: for a more delicious web
http://scripty2.com/
Other
516 stars 57 forks source link

Fix for S2.FX.Parallel to notify aggregated objects about steps. #27

Closed rafalwrzeszcz closed 13 years ago

rafalwrzeszcz commented 13 years ago

There is a problem with S2.FX.Parallel that it doesn't invoke methods on aggregated effects like start() or cancel(), so it's callbacks won't be executed. What's more, effects can even not be completed, since cancel() is not called, which causes teardown() to not be called.

I believe those are two methods that have to be called on sub-effects to make them fully functional (start() marks effects as "running" as cancel() won't take any effect if status is not "running") - i don't see any need to call finish() on sub-effects (but if it would be needed, then canel() should not be called - only one of them should be called by parallel aggregator).

madrobby commented 13 years ago

I've applied this—please think about adding tests!