canjs / can-zone

A context for tracking asynchronous activity in JavaScript applications.
https://v4.canjs.com/doc/can-zone.html
MIT License
92 stars 4 forks source link

Handle nested tasks #54

Closed matthewp closed 8 years ago

matthewp commented 8 years ago

Tasks are said to be nested when they are called within the code of another task. This is a problem because it means we would be executing lifecycle hooks more than once per async operation, which can lead to hooks doing the wrong thing (a beforeTask could be called twice, where before/after tasks are meant to do setup/teardown). Closes #53