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

Swapping out event loop group for OS X #134

Closed
wants to merge 1 commit into from
Closed

Swapping out event loop group for OS X #134

wants to merge 1 commit into from

Conversation

drekka
Copy link
Contributor

@drekka drekka commented Jul 21, 2022

This is an alternative I just figured out. It replaces the MultiThreadedEventLoopGroup with a NIOTSEventLoopGroup for OSX >= 10.14.

A lingering thought though is will this bug still be present on Linux? Because I have someone who wants to use this on a linux machine.

Signed-off-by: Derek Clarkson <d4rkf1br3@gmail.com>
@codecov
Copy link

codecov bot commented Jul 21, 2022

Codecov Report

Merging #134 (16003ef) into main (9eff305) will decrease coverage by 0.01%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main     #134      +/-   ##
==========================================
- Coverage   78.36%   78.34%   -0.02%     
==========================================
  Files          71       71              
  Lines        3046     3039       -7     
==========================================
- Hits         2387     2381       -6     
+ Misses        659      658       -1     
Impacted Files Coverage Δ
Sources/Hummingbird/Application.swift 93.33% <75.00%> (-1.75%) ⬇️
...s/HummingbirdFoundation/Files/FileMiddleware.swift 87.41% <0.00%> (+0.83%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9eff305...16003ef. Read the comment docs.

@adam-fowler
Copy link
Member

You can set the eventLoopGroup in the constructor of HBApplication. If you really wanted to use NIOTSEventLoopGroup on macOS you can already do that. But you'll find your server while running on Mac will service considerably less requests as NIOTSEventLoop is really designed for client applications. So the default should be MultiThreadedEventLoopGroup on macOS. It is NIOTSEventLoopGroup on iOS because iOS doesn't deal with POSIX threads very well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants