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

Fix various errata in Async & Performance Ch. 4: Generators #434

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on May 7, 2015

  1. Swap *foo(1) and *foo(3) in delegated yield steps 9 and 10

    I could be wrong/crazy, but isn't this change correct?
    
    9. The first request() call should be in the *foo(1) instance, as *foo(2) and *foo(3) are waiting.
    
    10. *foo(2) yields its request promise back to *foo(3), not to *foo(1), which has already completed by this time.
    airandfingers committed May 7, 2015
    Copy the full SHA
    062b377 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2015

  1. Fix thunkify to work when called multiple times

    The thunkify definitions as published will only work the first time they are called, after which the thunkory will continue appending to a shared args array, calling `fn` with more and more arguments.
    
    To prevent this, the thunkory should clone a new copy of args every time it is called, and push the latest cb to that args array.
    airandfingers committed May 9, 2015
    Copy the full SHA
    594669c View commit details
    Browse the repository at this point in the history
  2. Fix manual transformation description (resolve -> request)

    The explanation of the process() manual transformation function includes references to a "resolve" function that is not used in the example. 
    
    It's clear from context that the explanation is referring to the "yield request" statement replaced by "return request".
    airandfingers committed May 9, 2015
    Copy the full SHA
    8b5c7df View commit details
    Browse the repository at this point in the history