Open Nickxingyu opened 2 years ago
I mentioned this in #73, but if we exit where you have proposed, then the context gets ripped out from underneath the runPromise
call if it is actually async and needs to get/set any values from its context after it awaits its calls.
This IS a problem though; I think it's a much deeper issue though since promises open the door to there needing to be multiple "current" contexts and I'm not seeing a good way around that.
I think runPromise should exit context before return promise ! Otherwise, the context can be modify by operations outside this context.