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

feat: executor v3 #555

Draft
wants to merge 19 commits into
base: next
Choose a base branch
from
Draft

Conversation

adamspofford-dfinity
Copy link
Contributor

@adamspofford-dfinity adamspofford-dfinity commented Feb 8, 2025

This overhauls the CDK executor to a true task scheduler model.

  • All external functions must be wrapped in a context closure i.e. in_*_context, which the export macros do for you. spawn calls will not be immediately run, but will be instead polled in between the context closure returning and the in_*_context function returning.
    • This fixes the final incompatibility between ic_cdk and FuturesUnordered, as well as non-cdk sources of async completion like channels.
    • Since this is a silently breaking change due to the execution reordering, the opportunity is also taken to make ic_cdk::futures a public module and remove the reexports in the root. The hard break ensures users will notice the change.
  • The implementation of CallFuture is changed to a state machine.
  • Non-async functions with export attributes are no longer spawned as futures.

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

Successfully merging this pull request may close these issues.

1 participant