Skip to content

Instantly share code, notes, and snippets.

@EgorBo
Created October 6, 2017 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EgorBo/a9691f56b747fc76fc23684b328d1b10 to your computer and use it in GitHub Desktop.
Save EgorBo/a9691f56b747fc76fc23684b328d1b10 to your computer and use it in GitHub Desktop.
using System;
using System.Threading;
namespace ConsoleApplication
{
internal class Program
{
public static void Main(string[] args)
{
var maxThreads = 0x7fff;
ThreadPool.SetMaxThreads(maxThreads + 1, maxThreads + 1);
int maxWT, macCP;
ThreadPool.GetMaxThreads(out maxWT, out macCP);
Console.WriteLine(maxWT == maxThreads);
Console.WriteLine(macCP == maxThreads);
//.NET: true true
//Mono: false false
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment