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

Experimental - Task to Promise conversion #1567

Merged
merged 6 commits into from
Oct 12, 2023

Commits on Oct 11, 2023

  1. Task methods convert to Promise internaly

    Xicy authored and lahma committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    a0a0c0f View commit details
    Browse the repository at this point in the history
  2. added new test case from issue 514-1507127509

    Xicy authored and lahma committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    b8001b5 View commit details
    Browse the repository at this point in the history
  3. Readablity increased

    ExecutionCanceledException used for canceled operations
    Xicy authored and lahma committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    86d3ce0 View commit details
    Browse the repository at this point in the history
  4. fix: Marshal async Tasks as undefined

    This commit fixes an issue where an `async Task` (be it a method or a delegate)
    would end up being marshalled directly to JS, giving a `Task<VoidTaskResult>`
    to the user, instead of `undefined`, which is what is returned for
    "synchronous tasks", i.e. any Task-returning invokable function that does
    not generate an async state machine of its own (that is to say, any function
    that returns `Task`, not `async Task`.
    
    This commit fixes the issue by checking if a Task's result is equal to
    `VoidTaskResult`, which is an internal type used by the runtime to indicate
    a void-returning Task, such as that from an `async Task` method/delegate
    VelvetToroyashi authored and lahma committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    9a970f5 View commit details
    Browse the repository at this point in the history
  5. @VelvetToroyashi solvings

    Xicy authored and lahma committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    5b996d5 View commit details
    Browse the repository at this point in the history
  6. Workaround check

    Xicy committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    802fbfa View commit details
    Browse the repository at this point in the history