2013-04-12 42 views

回答

1

恩,對不起,因爲懶惰,夥計們。快速查看Dispatch的來源顯示,我可以通過setExecutorServiceHttp.configure傳遞我的線程執行程序。

例如

val pool: ExecutorService = Executors.newFixedThreadPool(4) 
val httpClient: Http = Http.configure(_.setAllowPoolingConnection(true).setFollowRedirects(true).setConnectionTimeoutInMs(1000).setExecutorService(pool)) 
+1

唯一的問題是,它沒有工作。調度不使用我通過的對象:(我稍後會發布更新。 – expert