SOF3 / await-std

Virion for writing PocketMine plugins in await style
Apache License 2.0
29 stars 7 forks source link

Clean up resolvers when they throw an exception. #14

Closed JavierLeon9966 closed 1 year ago

JavierLeon9966 commented 1 year ago

This is due to the new feature Await::safeRace() which will allow us to clean the resolvers easily.

SOF3 commented 1 year ago

Recently I realized that interrupt/safeRace may not work correctly when the Await::ONCE path is called. The PromiseState in await-generator is not aware that the generator has been interrupted and may continue to call the handler again if cleanup is not fully executed.

SOF3 commented 1 year ago

This pull request is currently on hold due to SOF3/await-generator#200, which I find a bit challenging to reproduce minimally. Help would be appreciated if you would like to look into it as well.

SOF3 commented 1 year ago

Thanks for your contribution, but I have decided to stop maintaining this repo and archive it. await-std contains several unrelated features that don't really fit well in the same repo. If you would like to continue maintaining this repo, feel free to fork it. But I would recommend creating a virion dedicated for awaitEvent instead.