【问题标题】:Scala and time-limited processingScala 和限时处理
【发布时间】:2014-04-30 06:00:36
【问题描述】:

我正在接受 Michael Genesereth 的 General Game Playing (GGP) Coursera course。在 GGP 中,玩家可以在固定的时间内移动。我正在用 Scala 编写我的播放器。 (底层 GGP 代码库是 Java。)Scala 是否提供任何支持(或是否有任何 Scala 库)可用于帮助确保计算将在给定时间内响应。

【问题讨论】:

    标签: scala concurrency concurrent.futures


    【解决方案1】:

    您可以使用Futures 并通过Await.result(future, duration)Scala Futures - built in timeout? 中的一种方法获得结果。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-25
    • 2017-07-01
    • 2011-12-08
    相关资源
    最近更新 更多