![JAR search and dependency download from the Maven repository](/logo.png)
io.undertow.server.handlers.BlockingHandler.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snunit-undertow_native0.5_3 Show documentation
Show all versions of snunit-undertow_native0.5_3 Show documentation
Scala Native server using NGINX Unit
The newest version!
package io.undertow.server.handlers
import io.undertow.server._
import scala.scalanative.meta.LinktimeInfo
final class BlockingHandler(handler: HttpHandler) extends HttpHandler {
def handleRequest(exchange: HttpServerExchange): Unit = {
exchange.startBlocking()
if (LinktimeInfo.isMultithreadingEnabled) {
scala.concurrent.ExecutionContext.global.execute(() =>
try { handler.handleRequest(exchange) }
finally { exchange.endExchange() }
)
} else {
try { handler.handleRequest(exchange) }
finally { exchange.endExchange() }
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy