Is there a standard Scala function for running a block with a timeout?

后端 未结 6 459
伪装坚强ぢ
伪装坚强ぢ 2020-12-19 02:40

I need to call into a service that may or not return timely results. I\'d like to be able to write

val result = runWithTimeout(5000, valReturnedOnTimeout) {         


        
6条回答
提交回复
热议问题