-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Remove MinHandles and OutstandingHandles logic from SocketAsyncEngine #36019
Conversation
Tagging subscribers to this area: @dotnet/ncl |
src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEngine.Unix.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEngine.Unix.cs
Show resolved
Hide resolved
|
||
Debug.Assert(handle != ShutdownHandle, $"Expected handle != ShutdownHandle: {handle}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is checked before adding to dictionary
I just confirmed that there are no regressions, the PR is ready for review |
Thanks for cleaning this up. |
{ | ||
s_currentEngines[s_allocateFromEngine] = engine = new SocketAsyncEngine(); | ||
} | ||
s_currentEngines[s_allocateFromEngine] = engine = new SocketAsyncEngine(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, the above can be condensed to:
engine = s_currentEngines[s_allocateFromEngine] ??= new SocketAsyncEngine();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: pre-existing your code, but the current
in s_currentEngines
seems superfluous. Maybe just s_engines
.
@tmds here is the promised removal of MinHandles logic. I am going to run some benchmarks for it tomorrow.