FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://cs.wikipedia.org/wiki/Koprogram

Koprogram – Wikipedie

Koprogramy (anglickycoroutine) jsou v informatice programové komponenty, které umožňují na rozdíl od podprogramů (procedur, funkcí, metod) více vstupních bodů, pozastavení a obnovení výpočtu v jejich různých místech. Koprogramy jsou vhodné pro implementaci kooperativního multitaskingu, iterátorů, proudů (stream) a trubek (pipe).

Termín koprogram poprvé použil Melvin Conway ve své seminární práci v roce 1963.

  1. ↑ M.E. Conway, Design of a separable transition-diagram compiler, Communications of the ACM, Vol. 6, No. 7, July 1963
  2. ↑ Příklad The Python Language Reference "http://docs.python.org/reference/expressions.html#yieldexpr 5.2.10. Yield expressions]":
    "All of this makes generator functions quite similar to coroutines; they yield multiple times, they have more than one entry point and their execution can be suspended. The only difference is that a generator function cannot control where should the execution continue after it yields; the control is always transferred to the generator's caller."
  3. ↑

View original on Wikipedia | Back | FazBrowse Home