Comparing master...lazy_task_tailcall · lewissbaker/cppcoro · GitHub
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: lewissbaker/cppcoro
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: lewissbaker/cppcoro
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: lazy_task_tailcall
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 10 commits
  • 11 files changed
  • 1 contributor

Commits on Aug 2, 2017

  1. Experimental implementation of tail-call lazy_task.

    Use the variant of await_suspend() that returns a
    coroutine handle.
    lewissbaker committed Aug 2, 2017
    Configuration menu
    Copy the full SHA
    39553bb View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2017

  1. Fixed tail-call implementation for lazy_task amd when_all.

    If await_suspend() returns a std::coroutine_handle then
    this is unconditionally resumed. So we now return a
    dummy coroutine_handle whose resume() method just
    immediately suspends in cases where there is no
    continuation ready to be resumed.
    lewissbaker committed Aug 3, 2017
    Configuration menu
    Copy the full SHA
    f86130a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2bdce53 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2017

  1. Configuration menu
    Copy the full SHA
    a1da0b2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d991920 View commit details
    Browse the repository at this point in the history
  3. Update async_generator<T> to use tail-call resumption.

    This greatly simplifies the implementation as we don't
    need to do anything special for the case where the
    async operations complete synchronously.
    
    The async_generator<T> no longer needs atomic operations
    to synchronise consumer/produce running concurrently since
    one is always suspended before resuming the other.
    lewissbaker committed Aug 4, 2017
    Configuration menu
    Copy the full SHA
    d74bebe View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2017

  1. Configuration menu
    Copy the full SHA
    dfc4128 View commit details
    Browse the repository at this point in the history
  2. Update recursive_generator to use tailcall suspend/resume.

    - recursive_generator's final_suspend now directly resumes
      the parent generator using symmetric control transfer in
      await_suspend() rather than trampolining off a loop in
      the pull() method.
    - Recursive yield_value() now has much simpler logic for
      maintaining the root/parent/leaf pointers due to use
      of symmetric transfer meaning we don't have to explicitly
      handle a coroutine completing synchronously.
    - yield_value() now stores pointer to value in the root
      generator's m_value. This should make repeated iterator
      dereferences slightly more efficient as the derference
      now has one less pointer dereference (the extra
      dereference is now in the yield_value() method).
    lewissbaker committed Aug 6, 2017
    Configuration menu
    Copy the full SHA
    f8cf7a6 View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2017

  1. Modify lazy_task<T> to allow tail recursion.

    Allows co_return'ing a lazy_task<T> instead of a T to perform
    tail recursion.
    lewissbaker committed Aug 7, 2017
    Configuration menu
    Copy the full SHA
    69a8df4 View commit details
    Browse the repository at this point in the history
  2. Fix tabs/spaces.

    lewissbaker committed Aug 7, 2017
    Configuration menu
    Copy the full SHA
    8594f96 View commit details
    Browse the repository at this point in the history
Loading