如何替换Scala 2.9并行集合的派生联接池? [英] How do I replace the fork join pool for a Scala 2.9 parallel collection?

查看:81
本文介绍了如何替换Scala 2.9并行集合的派生联接池?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找新的Scala 2.9并行集合,并希望放弃大量我那些类似的东西的简陋业余版本.特别是,我想用我自己的东西(例如,通过参与者在网络上分配任务评估的东西)替换默认实现基础下的派生联接池.我的理解是,这仅是应用Scala的可堆叠修改"范式的问题,但是collections库令人生畏,以至于我不确定要修改哪些位!

I've been looking at the new Scala 2.9 parallel collections and am hoping to abandon a whole lot of my crufty amateur versions of similar things. In particular, I'd like to replace the fork join pool which underlies the default implementation with something of my own (for example, something that distributes evaluation of tasks across a network, via actors). My understanding is that this is simply a matter of applying Scala's paradigm of "stackable modifications", but the collections library is intimidating enough that I'm not exactly sure which bits need modifying!

一些具体问题:

  1. 通过 FutureThreadPoolTasks .我将如何构建使用此特征而不是 ForkJoinTasks ?
  2. 我能再写一个替代方法(也许是一个相应的样板类,混在(作为参考,上述所有特征均在

    (For reference, all of the traits mentioned above are defined in Tasks.scala.)

    特别欢迎使用代码示例!

    Especially code examples are very welcome!

    推荐答案

    此处是描述如何在Scala 2.10中切换TaskSupport对象的文档.

    Here is a document describing how to switch TaskSupport objects in Scala 2.10.

    这篇关于如何替换Scala 2.9并行集合的派生联接池?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆