Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

The default thread count should be reflected on KestrelServerInformation.ThreadCount during application start #404

Closed
AspNetSmurfLab opened this issue Nov 19, 2015 · 0 comments
Assignees
Milestone

Comments

@AspNetSmurfLab
Copy link

The default thread count is currently determined by KestrelEngine after the application's Conifgure method has been called. This means the application can't inspect the default value for IKestrelServerInformation.ThreadCount, like it can for IKestrelServerInformation.NoDelay. Essentially, the following code should echo the correct defaults:

public void Configure(IApplicationBuilder app)
{
    var kestrel = app.ServerFeatures[typeof(IKestrelServerInformation)] as IKestrelServerInformation;

    if (kestrel != null)
    {
        Console.WriteLine($"Kestrel thread count: {kestrel.ThreadCount}");
        Console.WriteLine($"Kestrel TCP no-delay: {kestrel.NoDelay}");
    }
@muratg muratg added this to the 1.0.0-rc2 milestone Dec 3, 2015
@muratg muratg added the bug label Dec 3, 2015
khellang added a commit to khellang/KestrelHttpServer that referenced this issue Dec 4, 2015
This will allow you to inspect the property
in the Configure method.

Closes aspnet#404
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants