Exercise: Deep Async Cancelable

Practice how to implement a deep async cancelable that can cancel the operations from the main function.

Problem statement

Extend the createAsyncCancelable() function so that it’s possible to invoke other cancelable functions from within the main cancelable function. Canceling the main operation should also cancel all nested operations.

If you’re unsure about how to do this, click the “Show Hint” button.

Get hands-on with 1400+ tech skills courses.