Published July 28, 2004 | Version v1

Coroutines in Lua

  • 1. Catholic University of Rio de Janeiro, Rio de Janeiro, Brazil
  • 2. Pontifical Catholic University of Rio de Janeiro, Rio de Janeiro, Brazil
  • 3. PUC-Rio, Rio de Janeiro, Brazil

Description

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.

Files

jucs_article_28267.pdf

Files (125.3 kB)

Name Size
md5:4649e38eeeab1c9560c31dcbb025354c
125.3 kB Preview Download