Scala Actors: Unifying thread-based and event-based programming

Scala Actors: Unifying thread-based and event-based programming
复制标题

Scala Actors:统一基于线程和基于事件的编程

DOI:
10.1016/j.tcs.2008.09.019
复制
发表时间:
2009
期刊:
Theor. Comput. Sci.
影响因子:
--
通讯作者:
Martin Odersky
Martin Odersky
中科院分区:
--
文献类型:
--
作者:
Philipp Haller;Martin Odersky

文献摘要

被引文献

相似文献

消息传递并发性和虚拟机(如JVM)之间存在阻抗不匹配。VM通常将其线程映射到重量级OS进程。如果没有轻量级的流程抽象,用户通常被迫以事件驱动的方式编写并发应用程序的一部分,这会模糊控制流,并增加程序员的负担。在本文中,我们将展示如何基于线程和基于事件的编程可以统一在一个单一的演员抽象。使用Scala编程语言的高级抽象机制,我们在未修改的JVM上实现了我们的方法。我们的编程模型与底层VM的线程模型集成良好。
There is an impedance mismatch between message-passing concurrency and virtual machines, such as the JVM. VMs usually map their threads to heavyweight OS processes. Without a lightweight process abstraction, users are often forced to write parts of concurrent applications in an event-driven style which obscures control flow, and increases the burden on the programmer. In this paper we show how thread-based and event-based programming can be unified under a single actor abstraction. Using advanced abstraction mechanisms of the Scala programming language, we implement our approach on unmodified JVMs. Our programming model integrates well with the threading model of the underlying VM.