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

Remove MinHandles and OutstandingHandles logic from SocketAsyncEngine #36019

Merged
merged 5 commits into from
May 8, 2020

Conversation

adamsitnik
Copy link
Member

@tmds here is the promised removal of MinHandles logic. I am going to run some benchmarks for it tomorrow.

@adamsitnik adamsitnik added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label May 7, 2020
@ghost
Copy link

ghost commented May 7, 2020

Tagging subscribers to this area: @dotnet/ncl
Notify danmosemsft if you want to be subscribed.


Debug.Assert(handle != ShutdownHandle, $"Expected handle != ShutdownHandle: {handle}");
Copy link
Member Author

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

@adamsitnik adamsitnik changed the title Remove MinHandles logic from SocketAsyncEngine Remove MinHandles and OutstandingHandles logic from SocketAsyncEngine May 8, 2020
@adamsitnik adamsitnik removed the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label May 8, 2020
@adamsitnik adamsitnik marked this pull request as ready for review May 8, 2020 08:29
@adamsitnik adamsitnik requested review from tmds and stephentoub May 8, 2020 08:29
@adamsitnik
Copy link
Member Author

I just confirmed that there are no regressions, the PR is ready for review

@adamsitnik adamsitnik requested a review from antonfirsov May 8, 2020 10:58
@tmds
Copy link
Member

tmds commented May 8, 2020

Thanks for cleaning this up.

{
s_currentEngines[s_allocateFromEngine] = engine = new SocketAsyncEngine();
}
s_currentEngines[s_allocateFromEngine] = engine = new SocketAsyncEngine();
Copy link
Member

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();

Copy link
Member

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.

@adamsitnik adamsitnik merged commit 2e1bc9d into dotnet:master May 8, 2020
@adamsitnik adamsitnik deleted the removeMinHandles branch May 8, 2020 14:28
@karelz karelz added this to the 5.0.0 milestone Aug 18, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants