Skip to content
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

Investigate enabling Promise support in Cell #308

Open
fatcerberus opened this issue Nov 26, 2019 · 0 comments
Open

Investigate enabling Promise support in Cell #308

fatcerberus opened this issue Nov 26, 2019 · 0 comments

Comments

@fatcerberus
Copy link
Member

fatcerberus commented Nov 26, 2019

Attempting to use async functions or promises in Cell will currently throw an error like this:

Error: No async/promise continuation support
   at Module code ($/Cellscript.js:15:1)

Promise continuations are deliberately disabled because Cell doesn't have the necessary event loop hooks to support them. It's not even entirely clear where these hooks should be, whether they'd be processed between targets, or something else. It's also not clear what to do if a tool in the middle of building a target awaits an asynchronous operation: should Cell attempt to move on to the next (top-level) target? What if the only remaining targets to build are dependant on the one stuck in the middle of the await? Then what?

Unlike miniSphere which can guarantee several ticks (in the form of frames) per second, Cell doesn't have this luxury and introducing an event loop is going to require some serious thought to make sure things don't go wrong. Tentatively scheduling this for miniSphere 6.0, but time will tell if this is too ambitious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant