Using Javascript Promise instead of Yield #24286
Unanswered
abdollahkahne
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I was not familiar with generators. May be because of similarities here between generator and enumerators |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
AspNetCore.Docs/aspnetcore/signalr/streaming/samples/3.0/wwwroot/js/stream.js
Line 42 in b0a9a7d
As a reader I could not understand and connect with
yield
here. I presume,yield
is used here to be sure that itfulfilled
before continuing. May be its better to use the promisethen
andcatch
block here from my point of view as I do it here for example. And maybe some people be easier withyield
version. I just want to share it here. Sorry if it may be boring:Beta Was this translation helpful? Give feedback.
All reactions