Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash after installing posix ELG as concurrency executor #3179

Closed
MahdiBM opened this issue Apr 29, 2024 · 1 comment · Fixed by #3168
Closed

Crash after installing posix ELG as concurrency executor #3179

MahdiBM opened this issue Apr 29, 2024 · 1 comment · Fixed by #3168
Labels
bug Something isn't working

Comments

@MahdiBM
Copy link
Contributor

MahdiBM commented Apr 29, 2024

Describe the issue

Crash after installing posix ELG as concurrency executor.

Quoting Johannes:

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")
}
Screenshot 2024-04-29 at 2 02 54 PM

Outcome

Crash at Application.execute():

Screenshot 2024-04-29 at 2 03 27 PM

Additional notes

No response

@MahdiBM MahdiBM added the bug Something isn't working label Apr 29, 2024
@0xTim
Copy link
Member

0xTim commented Apr 29, 2024

See #3168 which should solve the issue

@0xTim 0xTim linked a pull request Apr 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants