Computation with time limit

后端 未结 9 2365
你的背包
你的背包 2021-01-02 12:08

I\'m trying to write a construct which allows me to run computations in a given time window. Something like:

def expensiveComputation(): Double = //... some          


        
9条回答
  •  天命终不由人
    2021-01-02 12:47

    Only an idea: I am not so familiar with akka futures. But perhaps its possible to stick the future executing thread to the current thread and use akka futures with timeouts?

提交回复
热议问题