-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Meaning of memory leak when using async/await #197
Comments
I also don't understand the warning - it feels wrong as I consider myself pretty knowledgeable in promises. Async/await is no different from promises and thus should behave the same regarding memory leaks |
Please watch https://www.youtube.com/watch?v=XV-u_Ow47s0 |
I'm sorry but I'm not going to sit through a 30 minute video regarding a concept that I understand very well. Videos are a slow form of communication compared to written material. If you have a timestamp or a post somewhere that explains your point better then I'll take a look and discuss, but it sounds like you're warning against improper use of promises rather than async/await |
It's not about async/await per se, but about mixing callbacks and promises. |
gotcha - thanks much |
So you should give a warning about unhandled rejections not memory leak, Am I right? Because unhandled rejections results in crash and not memory leak. |
You are giving a warning to don't use the
async/await
syntax inside theAsyncTask
:I watched the video you mentioned but I still couldn't figure it out what you are concerning about? I think this warning is not the case when I'm scheduling a single job (or scheduling some few - less than 10 - jobs). So are you warning about executing many multiple tasks which are using
async/await
syntax simultaneously because eachawait
is creating 3 promises in heap memory?It is appreciated if you give an example of how using
async/await
could results in memory leak.Personally, I prefer to use
async/await
syntax always because it is more readable and that's why I'm curious about your warning.The text was updated successfully, but these errors were encountered: