??????? ??? ????? GetMinThreads ???? ????? SetMinThreads ???? ????? ThreadPool ?? .NET Framework 1.1

?????? ????????? ?????? ?????????
???? ???????: 827419 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

????? ???

???? Microsoft .NET Framework 1.1 ???? ??????? ????:
  • SetMinThreads
  • GetMinThreads
???? ????????? ????? ?? ??? ??? ThreadPool. ??? ??????? ??????? SetMinThreads ?????? ??? ?????? ??????? ???? ?????? ?? ??? ?????? ??????? ????? ???????/??????? ???? ????? ??? ??? ThreadPool. ??? ??????? ??????? GetMinThreads ?????? ??? ????????? ???????.

??????? ????

???? ?????? ???? ?????? ??????? ?????? ???? ??? ???????? ??? ???? ThreadPool ???? ??????? ??? ???:
  • ???? ????? ??? ????? ?????????
  • ???? ????? ???? ?? ?? ???? ???? ??????? ?????
  • ???? ????? ???? ??? ??? I/O
?? ???? ??????? ???? ??? ??????? ?????? ??????? ?????? ??? ??? ????? ????? ???? ???? ????? ??? ???? ?? ?????? ???????. ????? ??? ???????? ?????? ????? SetMinThreads ?????? ??? ?????? ??????? ???? ?????? "?" ??? ?????? ??????? ????? ???????/??????? ???? ????? ??? ??? ThreadPool. ?????? ??????? GetMinThreads ?????? ??? ????????? ?????? ???????.

????? SetMinThreads

  • ????? ???? ???????? ???????? ???? ???? ?????
     
    public static bool SetMinThreads(int workerThreads, int completionPortThreads)
    {
     return SetMinThreadsNative(workerThreads, completionPortThreads);
    }
    SetMinThreads ???????.
  • ????? ????? ????? SetMinThreads ?????? ??? ???? ?????? ?????? ??????? ?????? ??? ?????? ??????? ????? ???????/??????? ???? ??? ???????? ??? ?????? ????? ThreadPool.
  • ??????? SetMinThreads ?????? ????? ???????? ??????? ??????? ?????? ??? ????? ?? ??? ????????? ???? ??? ???? ?????????.
  • ??? ??? ?????? ??? ???? ?? ??? ???? ?? ????? ?????? ??????? ????? ??? ThreadPool ?????? ???? ????? ?????? ??? ?? ????? GetMaxThreads ??? ThreadPool ????? SetMinThreads ????? false ? ?? ??? ????? ?? ?? ??? ???? ??????.

????? GetMinThreads

  • ????? ???? ???????? ???????? ???? ???? ????? ????? GetMinThreads.
    public static void GetMinThreads(out int workerThreads, out int completionPortThreads)
    {
     GetMinThreadsNative(out workerThreads, out completionPortThreads);
    }
  • ????? ????? ????? GetMinThreads ??? ??? ThreadPool ???? ?? .NET Framework 1.1 ?????? ??? ??? ?????? ??????? ???? ?????? "?" ??? ?????? ??????? ????? ???????/??????? ???? ??? ???????? ??? ?????? ????? ThreadPool.
  • ????? GetMinThreads ???? ??? ????? ???????? ??????? ????? ???? ??? ????? ?? ??? ????????? ???? ??? ???? ???????.

????? ????????? ???????? ???? ?????? ??????? SetMinThreads ????? GetMinThreads

?? ????? ???????? ???????? ??????? ? ????? ?????? ??????? ???? ?????? ?? ????? ??? 4. ??? ???????? ???? ???? ?????? ???? ?????? ??????? ??????? I/O ?????? ??????.

Microsoft Visual Basic .NETminWorker
Dim minWorker, minIOC As Integer
        ' Get the current settings.
        ThreadPool.GetMinThreads(minWorker, minIOC)
        ' Change the minimum number of Worker threads to 4 but keep
        ' the old setting for the minimum I/O completion threads.
        If ThreadPool.SetMinThreads(4, minIOC) Then
            ' The minimum number of threads is set successfully.
        Else
            ' The minimum number of threads is not changed.
        End If
Microsoft Visual C# .NET
int minWorker, minIOC;
        // Get the current settings.
        ThreadPool.GetMinThreads(out minWorker, out minIOC);
        // Change the minimum number of Worker threads to 4 but keep
        // the old setting for minimum I/O completion threads.
        if (ThreadPool.SetMinThreads(4, minIOC))
        {
            // The minimum number of threads is set successfully.
        }
        else
        {
            // The minimum number of threads is not changed.
        }

?????

?????? ??? ??????? ??????? ???? ??? ????? ???????? ??????? ?????? ?? "????? ??????? ?? Microsoft:
810259FIX: SetMinThreads API GetMinThreads ????? ??? ??? ????? ????? ?????? ??? ThreadPool
315460????? ????? ???? ??? ??? ???? ?????? ??????? ???????? Visual C# .NET

???????

???? ???????: 827419 - ????? ??? ??????: 29/?????/1425 - ??????: 1.3
????? ???
  • Microsoft Visual C# .NET 2003 Standard Edition
  • Microsoft Visual Basic .NET 2003 Standard Edition
  • Microsoft .NET Framework 1.1
????? ??????: 
kbmt kbinfo kbhowto kbthread kbperformance kbcommandline KB827419 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????827419

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com