文件名称:LUA - coroutine
文件大小:114KB
文件格式:PDF
更新时间:2017-10-06 05:26:45
lua coroutine paralle
The concept of a coroutine is one of the oldest proposals for a general control abstraction. It is attributed to Conway [Conway, 1963], who described coroutines as “subroutines who act as the master program”, and implemented this construct to simplify the cooperation between the lexical and syntactical analysers in a COBOL compiler. Marlin’s doctoral thesis [Marlin, 1980], widely acknowledged as a reference for this mechanism, resumes the fundamental characteristics of a coroutine as follows: “the values of data local to a coroutine persist between successive calls”; “the execution of a coroutine is suspended as control leaves it, only to carry on where it left off when control re-enters the coroutine at some later stage”.