{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,2]],"date-time":"2026-10-02T12:51:38Z","timestamp":1790945498664,"version":"4.1.0"},"reference-count":46,"publisher":"Association for Computing Machinery (ACM)","issue":"2","license":[{"start":{"date-parts":[[2009,2,1]],"date-time":"2009-02-01T00:00:00Z","timestamp":1233446400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Program. Lang. Syst."],"published-print":{"date-parts":[[2009,2]]},"abstract":"<jats:p>This article advocates the revival of coroutines as a convenient general control abstraction. After proposing a new classification of coroutines, we introduce the concept of full asymmetric coroutines and provide a precise definition for it through an operational semantics. We then demonstrate that full coroutines have an expressive power equivalent to one-shot continuations and one-shot delimited continuations. We also show that full asymmetric coroutines and one-shot delimited continuations have many similarities, and therefore present comparable benefits. Nevertheless, coroutines are easier implemented and understood, especially in the realm of procedural languages.<\/jats:p>","DOI":"10.1145\/1462166.1462167","type":"journal-article","created":{"date-parts":[[2009,2,25]],"date-time":"2009-02-25T14:44:30Z","timestamp":1235573070000},"page":"1-31","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":94,"title":["Revisiting coroutines"],"prefix":"10.1145","volume":"31","author":[{"given":"Ana L\u00facia De","family":"Moura","sequence":"first","affiliation":[{"name":"Catholic University of Rio de Janeiro (PUC--Rio), Rio de Janeiro, RJ"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Roberto","family":"Ierusalimschy","sequence":"additional","affiliation":[{"name":"Catholic University of Rio de Janeiro (PUC--Rio), Rio de Janeiro, RJ"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2009,2,20]]},"reference":[{"key":"e_1_2_1_1_1","volume-title":"Proceedings of the USENIX Annual Technical Conference. USENIX.","author":"Adya A."},{"key":"e_1_2_1_2_1","volume-title":"Proceedings of the 9th Workshop on Hot Topics in Operating Systems (HotOS IX).","author":"Behren R."},{"key":"e_1_2_1_3_1","unstructured":"Birtwistle G. Dahl O.-J. Myhrhaug B. and Nygaard K. 1980. Simula Begin. Studentlitteratur Sweden. Birtwistle G. Dahl O.-J. Myhrhaug B. and Nygaard K. 1980. Simula Begin. Studentlitteratur Sweden."},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/231379.231395"},{"key":"e_1_2_1_5_1","unstructured":"Clocksin W. and Mellish C. 1981. Programming in Prolog. Springer. Clocksin W. and Mellish C. 1981. Programming in Prolog. Springer."},{"key":"e_1_2_1_6_1","unstructured":"Conway D. 2000. Rfc 31: Subroutines: Co-routines. http:\/\/dev.perl.org\/perl6\/rfc\/31.html. Conway D. 2000. Rfc 31: Subroutines: Co-routines. http:\/\/dev.perl.org\/perl6\/rfc\/31.html."},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/366663.366704"},{"key":"e_1_2_1_8_1","unstructured":"Dahl O.-J. Dijkstra E. W. and Hoare C. A. R. 1972. Hierarchical program structures. In Structured Programming 2nd ed. Academic Press London. Dahl O.-J. Dijkstra E. W. and Hoare C. A. R. 1972. Hierarchical program structures. In Structured Programming 2nd ed. Academic Press London."},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/91556.91622"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1016\/0096-0551(89)90018-0"},{"key":"e_1_2_1_11_1","unstructured":"Felleisen M. 1985. Transliterating Prolog into Scheme. Tech. rep. 182 Indiana University. Felleisen M. 1985. Transliterating Prolog into Scheme. Tech. rep. 182 Indiana University."},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/73560.73576"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.5555\/645388.651590"},{"key":"e_1_2_1_14_1","unstructured":"Felleisen M. and Friedman D. 1986. Control operators the SECD-machine and the \u03bb-calculus. In Formal Description of Programming Concepts-III M. Wirsing Ed. North-Holland 193--217. Felleisen M. and Friedman D. 1986. Control operators the SECD-machine and the \u03bb-calculus. In Formal Description of Programming Concepts-III M. Wirsing Ed. North-Holland 193--217."},{"key":"e_1_2_1_15_1","unstructured":"Griswold R. and Griswold M. 1983. The Icon Programming Language. Prentice-Hall NJ. Griswold R. and Griswold M. 1983. The Icon Programming Language. Prentice-Hall NJ."},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/99583.99608"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1016\/0743-1066(87)90016-1"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1016\/0096-0551(87)90003-8"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.1016\/0096-0551(86)90007-X"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1145\/29873.30392"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/99163.99178"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF01019946"},{"key":"e_1_2_1_23_1","unstructured":"Ierusalimschy R. 2003. Programming in Lua. Lua.org Rio de Janeiro Brazil. Ierusalimschy R. 2003. Programming in Lua. Lua.org Rio de Janeiro Brazil."},{"key":"e_1_2_1_24_1","unstructured":"Ierusalimschy R. and de Moura A. L. 2008. Some proofs about coroutines. Monografias em Ci\u1ebdncia da Computa\u00e7\u00e3o 04\/08 PUC-Rio Rio de Janeiro Brazil. Ierusalimschy R. and de Moura A. L. 2008. Some proofs about coroutines. Monografias em Ci\u1ebdncia da Computa\u00e7\u00e3o 04\/08 PUC-Rio Rio de Janeiro Brazil."},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1002\/(SICI)1097-024X(199606)26:6%3C635::AID-SPE26%3E3.0.CO;2-P"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/73560.73574"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1023\/A:1010051815785"},{"key":"e_1_2_1_28_1","unstructured":"Knuth D. E. 1968. The Art of Computer Programming Volume 1 Fundamental Algorithms. Addison-Wesley Reading MA. Knuth D. E. 1968. The Art of Computer Programming Volume 1 Fundamental Algorithms. Addison-Wesley Reading MA."},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1023\/A:1007782300874"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1145\/359763.359789"},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.5555\/539627"},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1002\/spe.4380101002"},{"key":"e_1_2_1_33_1","first-page":"910","article-title":"Coroutines in Lua","volume":"10","author":"Moura A.","year":"2004","journal-title":"J. Universal Comput. Sci."},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/225540.225541"},{"key":"e_1_2_1_35_1","doi-asserted-by":"crossref","unstructured":"Pauli W. and Soffa M. L. 1980. Coroutine behaviour and implementation. Softw Pract. &amp; Exper. 10 3 189--204. Pauli W. and Soffa M. L. 1980. Coroutine behaviour and implementation. Softw Pract. &amp; Exper. 10 3 189--204.","DOI":"10.1002\/spe.4380100305"},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1145\/99583.99610"},{"key":"e_1_2_1_37_1","unstructured":"Richter J. 1997. Advanced Windows 3rd ed. Microsoft Press Redmond WA. Richter J. 1997. Advanced Windows 3rd ed. Microsoft Press Redmond WA."},{"key":"e_1_2_1_38_1","doi-asserted-by":"crossref","unstructured":"Schemenauer N. Peters T. and Hetland M. 2001. PEP 255: Simple generators. http:\/\/www.python.org\/peps\/pep-0255.html. Schemenauer N. Peters T. and Hetland M. 2001. PEP 255: Simple generators. http:\/\/www.python.org\/peps\/pep-0255.html.","DOI":"10.1353\/pep.2001.0020"},{"key":"e_1_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.1145\/1013963.1013986"},{"key":"e_1_2_1_40_1","doi-asserted-by":"publisher","DOI":"10.1145\/155090.155104"},{"key":"e_1_2_1_41_1","unstructured":"Sitaram D. 1994. Models of control and their implications for progamming language design. Ph.D. thesis Rice University. Sitaram D. 1994. Models of control and their implications for progamming language design. Ph.D. thesis Rice University."},{"key":"e_1_2_1_42_1","unstructured":"Springer G. and Friedman D. 1989. Scheme and the Art of Programming. MIT Press Cambridge MA. Springer G. and Friedman D. 1989. Scheme and the Art of Programming. MIT Press Cambridge MA."},{"key":"e_1_2_1_43_1","volume-title":"Proceedings of the 8th International Python Conference","author":"Tismer C.","year":"2000"},{"key":"e_1_2_1_44_1","doi-asserted-by":"publisher","DOI":"10.1023\/A:1010093700911"},{"key":"e_1_2_1_45_1","doi-asserted-by":"publisher","DOI":"10.1145\/1016850.1016861"},{"key":"e_1_2_1_46_1","volume-title":"3rd, corrected ed","author":"Wirth N."}],"container-title":["ACM Transactions on Programming Languages and Systems"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/1462166.1462167","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/1462166.1462167","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T13:30:14Z","timestamp":1750253414000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/1462166.1462167"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2009,2]]},"references-count":46,"journal-issue":{"issue":"2","published-print":{"date-parts":[[2009,2]]}},"alternative-id":["10.1145\/1462166.1462167"],"URL":"https:\/\/doi.org\/10.1145\/1462166.1462167","relation":{},"ISSN":["0164-0925","1558-4593"],"issn-type":[{"value":"0164-0925","type":"print"},{"value":"1558-4593","type":"electronic"}],"subject":[],"published":{"date-parts":[[2009,2]]},"assertion":[{"value":"2008-03-01","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2008-04-01","order":1,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2009-02-20","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}