Go home now Header Background Image
Submission Procedure
share: |
Follow us
Volume 10 / Issue 7

available in:   HTML (45 kB) PDF (122 kB) PS (126 kB)
Similar Docs BibTeX   Write a comment
Links into Future
DOI:   10.3217/jucs-010-07-0910


Coroutines in Lua

Ana LĂșcia de Moura (Catholic University of Rio de Janeiro, Brazil)

Noemi Rodriguez (Catholic University of Rio de Janeiro, Brazil)

Roberto Ierusalimschy (Catholic University of Rio de Janeiro, Brazil)

Abstract: After a period of oblivion, a renewal of interest in coroutines is being observed. However, most current implementations of coroutine mechanisms are restricted, and motivated by particular uses. The convenience of providing true coroutines as a general control abstraction is disregarded. This paper presents and discusses the coroutine facilities provided by the language Lua, a full implementation of the concept of asymmetric coroutines. It also shows that this powerful construct supports easy and succint implementations of useful control behaviors.

Keywords: Lua language, control structures, coroutines, generators

Categories: D.3.3