DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
Redux Ecosystem Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
hard
Redux Ecosystem
Why does the minimal cancellable-task implementation rely on the generator's built-in .return() method for cancellation?
A
It's an arbitrary implementation choice with no particular reason
B
.return() causes the generator to jump directly to any enclosing finally block, exactly as a real return statement would at that paused point — this is precisely what makes finally-based cleanup logic reachable on cancellation
C
.return() forcibly kills the JavaScript process
D
.return() is required syntax for all generator functions
Check Answer