【24h】

Events in Haskell, and How to Implement Them

机译:Haskell中的事件及其实现方法

获取原文
获取原文并翻译 | 示例

摘要

We describe a new and simpler implementation in Haskell of CML's events, which encode reactions by a thread to combinations of messages from other threads. We add a new type of Guarded Events, by which recipients can filter messages with conditions on their value known as Guards. We implement guarded channels. The guard type and the indexing algorithm are not part of the channel definition, so that the user can trade off what guards are required against the cost of indexing. As an example we sketch the encapsulation of a graphical user interface toolkit. This can be done concisely not only because of guarded events, but also because we construct, events monadically. Monadic events are especially helpful for representing concurrent processes which transform themselves in reaction to external communications.
机译:我们在Haskell中描述了CML事件的一种新的,更简单的实现,该事件编码了一个线程对来自其他线程的消息组合的反应。我们添加了一种新型的“受保护事件”,收件人可以通过该类型过滤带有条件的邮件,这些条件具有其值(称为“保护”)。我们实施受保护的渠道。保护类型和索引算法不是通道定义的一部分,因此用户可以权衡需要哪些保护措施以抵御索引成本。作为示例,我们概述了图形用户界面工具包的封装。可以简单地做到这一点,不仅因为有受保护的事件,而且还因为我们单单构造事件。单子事件对于表示并发过程特别有帮助,这些并发过程会因对外部通信的反应而自我转化。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号