Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As it is, the fact that the promise initializer function is called immediately is a god send. If I had a dollar for every concurrency race-like condition that has prevented..

Constructor doesn't just take a function, it takes a closure if you so choose.. A closure that has immediate access to resolve and reject and doesn't have to worry about other code paths access its enclosed vars first.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: