Use a fork join pool executor with parallelism = 4
This commit is contained in:
parent
4612dfa1cd
commit
89eeb76c46
|
|
@ -14,6 +14,7 @@ class Server(port: Int) {
|
|||
|
||||
implicit val formats: DefaultFormats.type = DefaultFormats
|
||||
val server: HttpServer = HttpServer.create(new InetSocketAddress(port), 32)
|
||||
server.setExecutor(new java.util.concurrent.ForkJoinPool(Runtime.getRuntime().availableProcessors()*4))
|
||||
|
||||
private def getRequestJson(ex: HttpExchange): JValue = {
|
||||
val requestBody = ex.getRequestBody
|
||||
|
|
|
|||
Loading…
Reference in New Issue