BabylonJS / BabylonJS/BabylonNative
Fix async issues during runtime teardown - pure functions
Open
- Dominant language
- C++
- Stars
- 919
- Forks
- 162
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 19
Description
There's a TODO comment in NativeEncoding (PR: #1555) that highlights the problem: async operations might crash during JS teardown because they're not tied to any JavaScript object's lifetime.
Unlike our other plugins that clean up their pending work in destructors, the stateless design of NativeEncoding (and potentially other "pure function" style plugins) means there's no clear place to handle cleanup.
A broad solution would be nice for handling these dangling async operations during shutdown - either by cancelling them, waiting for them to complete, or some other mechanism that works across the codebase.
Contributor guide
Assessment
This issue has not been assessed yet.