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

Allow Coroutine Continuations #618

Closed
wants to merge 6 commits into from
Closed

Commits on Feb 20, 2024

  1. allow coroutine continuation

    Allows passing a coroutine in place of a callback in all methods using
    uv_req_t. The coroutine will be yielded and then resumed using the
    synchronous argument list [not the (err, value) callbacks recieve]. I
    have not yet completely verified the behaviour when passing a coroutine
    that is not the running thread, however it should work.
    
    Enabled by default, any blocking function call inside of the not-main
    coroutine will be a yield + resume to allow the libuv event loop to
    continue running. This behavior can be changed with the
    LUV_FORCE_COROUTINE_CONTINUATION flag to cmake.
    
    Tap has been modified to *also* run tests inside of a coroutine to
    provide a testing suite for these changes.
    
    This is a merge of 5 commits:
    * add coroutine continuation support
    * add changes to documentation, add LUV_FORCE_COROUTINE_CONTINUATION
    * run test suite over all functions run in a coroutine
    * luv_error dislikes success statuses
    * fix memory leak in write when yielded
    
    Signed-off-by: truemedian <truemedian@gmail.com>
    truemedian committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    3e74b7d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    18d16db View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ccdeb50 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    eb618e2 View commit details
    Browse the repository at this point in the history
  5. rebase on master

    truemedian committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    e2619c7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8e2e85d View commit details
    Browse the repository at this point in the history