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

Merged
merged 19 commits into from
Feb 12, 2025
Merged

feat: executor v3 #555

merged 19 commits into from
Feb 12, 2025

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.

@adamspofford-dfinity adamspofford-dfinity marked this pull request as ready for review February 11, 2025 14:35
@adamspofford-dfinity adamspofford-dfinity requested a review from a team as a code owner February 11, 2025 14:35
@lwshang lwshang merged commit b8f9b27 into next Feb 12, 2025
11 checks passed
@lwshang lwshang deleted the spofford/executor-v3-next2 branch February 12, 2025 15:35
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.

2 participants