mirror of
https://github.com/librecaptcha/lc-core.git
synced 2025-02-12 03:08:06 -05:00
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…
x
Reference in New Issue
Block a user