Crash after installing posix ELG as concurrency executor
MahdiBM opened this issue · comments
Mahdi Bahrami 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
Tim Condon commented
See #3168 which should solve the issue