It works almost as well without the yield.
That is really a micro-optimisation, in that it relinguishes the rest of the current timeslice, giving the co-routine a chance of getting control a few cycles earlier.
If your platform supports a sleep that handles microseconds *and* relinguishes timeslice (e.g Win32::Sleep), then the yield becomes completely redundant.
In reply to Re: Re: Re: complex iterator needed
by BrowserUk
in thread complex iterator needed
by japhy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |