Quoting Michael Lazzaro <[EMAIL PROTECTED]>: > Similarly, then, I would expect: > > sub foo(...) is threaded { ... yield() ... return() } > > foo(...args...) > > to start &foo as a new thread. C<yield()> would temporarily suspend > the thread, and C<return()> would end the thread. (Note that you could > use &_.yield to yield the current Code object, so you can have nested > yields w/out confusion -- see C<leave>, from A6.)
On the other hand, with this setup, the user may not be aware that calling foo() starts another thread; the syntax should, IMHO, be more explicit. -- "In Soviet Russia, jokes laugh at YOU!" http://www.milkbone.org