Crash after installing posix ELG as concurrency executor
Closed this issue · 1 comments
MahdiBM commented
Describe the issue
Crash after installing posix ELG as concurrency executor.
Letting NIO take over the Concurrency thread pool is important for performance. We saw roughly 30% improvements on Linux for non-I/O code and much more for I/O code.
Vapor version
4.94.1
Operating system and version
macOS 14.4
Swift version
Swift 5.10 RELEASE
Steps to reproduce
Add this code (also import NIO
) to the Entrypoint in the bare Vapor template:
if NIOSingletons.unsafeTryInstallSingletonPosixEventLoopGroupAsConcurrencyGlobalExecutor() {
print("*** installed posix 'EventLoopGroup' as concurrency global executor")
} else {
print("*** FAILED to install posix 'EventLoopGroup' as concurrency global executor")
}
Outcome
Crash at Application.execute()
:
Additional notes
No response