#1702: Cannot resume dead coroutine
----------------------+-----------------------------------------------------
 Reporter:  hanekomu  |        Type:  bug   
   Status:  new       |    Priority:  normal
Milestone:            |   Component:  none  
  Version:  2.5.0     |    Severity:  medium
 Keywords:            |        Lang:        
    Patch:            |    Platform:        
----------------------+-----------------------------------------------------

Comment(by allison):

 Talked with NotFound about this on IRC. To summarize:

 Any call to a coroutine will have to know if it is the initial call (where
 arguments are passed) or a subsequent call (where arguments are not
 passed). So, the best default behavior is to allow the coroutine to "die",
 rather than to implicitly "ressurect" it and start from the beginning.
 But, we do need a way to restart a dead coroutine (and possibly even to
 restart one that is currently active). The two best suggestions were a
 'restart' method on the coroutine object, and an optional named argument
 'restart'=>1 passed in with the other arguments to the coroutine. The
 method is simplest, and so could be implemented first. The optional named
 argument is a possible future refinement.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1702#comment:2>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to