Hey @mathias, Promise question for ya: if I do a Promise.race(A, B) where A is an operation that may never be triggered and B is one that will complete latently, will A be garbage collected once B resolves or will this leak memory?
-
Show this thread
-
I'm asking 'cause there's no cancelation mechanism for promises, so it's not clear to me what happens when A just decides not to call either resolve or reject. e.g. new Promise((resolve, reject) => { setTimeout(() => { /* noop */ }, 1000) });
3 replies 0 retweets 1 likeShow this thread
Replying to @DotProto
*catches up on thread* seems like my job here is done! Thanks everyone :)
11:29 PM - 19 Sep 2019
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.