Metadata
Author: WikiMatrix
Data
Czech[cs]
Zápis programu by mohl vypadat takto: var q := new queue coroutine produce loop while q is not full create some new items add the items to q yield to consume coroutine consume loop while q is not empty remove some items from q use the items yield to produce Fronta je zde kompletně naplněna nebo vyprázdněna před voláním příkazu yield a předáním řízení druhému koprogramu.
English[en]
The code might look like this: var q := new queue coroutine produce loop while q is not full create some new items add the items to q yield to consume coroutine consume loop while q is not empty remove some items from q use the items yield to produce The queue is then completely filled or emptied before yielding control to the other coroutine using the yield command.