Attached and detached closures in actorsShow others and affiliations
2018 (English)In: AGERE 2018 - Proceedings of the 8th ACM SIGPLAN International Workshop on Programming Based on Actors, Agents, and Decentralized Control, co-located with SPLASH 2018, Association for Computing Machinery (ACM), 2018, p. 54-61Conference paper, Published paper (Refereed)
Abstract [en]
Expressive actor models combine aspects of functional programming into the pure actor model enriched with futures. Such functional features include first-class closures which can be passed between actors and chained on futures. Combined with mutable objects, this opens the door to race conditions. In some situations, closures may not be evaluated by the actor that created them yet may access fields or objects owned by that actor. In other situations, closures may be safely fired off to run as a separate task. This paper discusses the problem of who can safely evaluate a closure to avoid race conditions, and presents the current solution to the problem adopted by the Encore language. The solution integrates with Encore’s capability type system, which influences whether a closure is attached and must be evaluated by the creating actor, or whether it can be detached and evaluated independently of its creator. Encore’s current solution to this problem is not final or optimal. We conclude by discussing a number of open problems related to dealing with closures in the actor model.
Place, publisher, year, edition, pages
Association for Computing Machinery (ACM), 2018. p. 54-61
Keywords [en]
Closures, Concurrent programming, Parallel programming, Type systems
National Category
Computer Sciences
Identifiers
URN: urn:nbn:se:kth:diva-241488DOI: 10.1145/3281366.3281371ISI: 000458146800006Scopus ID: 2-s2.0-85059003161ISBN: 9781450360661 (print)OAI: oai:DiVA.org:kth-241488DiVA, id: diva2:1281774
Conference
8th International Workshop on Programming based on Actors, Agents, and Decentralized Control, AGERE! 2018, co-located with SPLASH 2018, Boston, United States, 5 November 2018 through 5 November 2018
Note
QC 20190123
2019-01-232019-01-232019-02-22Bibliographically approved