With my system, each yield in a generator is reached, if so instructed.

The first is reached when yielded function is called.

Then the following are reached if :

- the current generator has a this.next() call
- a child generator has a parent.next() call, where child is a generator 
called by the current & parent is the current generator
- a parent generator has a child.next() call, where parent is a generator 
that called the current & child is the current generator

Doc & examples at https://github.com/Lcfvs/yld

Hoping that it will serve. ;)


Le samedi 17 août 2013 00:09:13 UTC+2, Mark Hahn a écrit :
>
> I've researched the various solutions to make generators work with or 
> replace node callbacks.  It appears that they fall into two camps.  In one 
> you wrap functions to make them callable as sync and in the other camp you 
> write sync code inside a generator.  Is this correct?  I know it is an 
> over-simplification. 
>
> They both seem like a bit of a pain to use.  There is a lot of new 
> semantics to master.  Is there any possibility a simpler solution could 
> exist in the future?
>
>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to