How it work? (yield w) #940
Closed
Aleksey-Danchin
started this conversation in
General
Replies: 1 comment
-
Yes.
const task = yield myGenerator();
yield* someOtherGenerator();
cancel(task); // cancel myGenerator
yield* join(task); // wait for myGenerator to finish |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wrote an example, I thought it wouldn't work. But it worked as expected. But I don't understand something.
yield w
creates some kind of thread that runs in parallel?(checked, continue)dot.remove();
won't stopwork
, right? The dot will not be visible, but the function will continue to be called?Beta Was this translation helpful? Give feedback.
All reactions