<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Coroutine - Page 13 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=coroutine&amp;p=12">1.Previous</a><br />
<a accesskey="3" href="page.php?w=coroutine&amp;p=14">3.Next</a>
</p>
<p>and there is no need for support from the operating system.</p>

<p>It is possible to implement coroutines using preemptively-scheduled threads, in a way that will be transparent to the calling code, but some of the advantages (particularly the suitability for hard-realtime operation and relative cheapness of switching between them) will be lost.</p>

<p><big>Generators</big></p>
<p>Generators, also known as semicoroutines, are a subset of coroutines. Specifically, while both can yield multiple times, suspending their execution and allowing re-entry at</p><p>
<a accesskey="1" href="page.php?w=coroutine&amp;p=12">1.Previous</a><br />
<a accesskey="3" href="page.php?w=coroutine&amp;p=14">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
