Skip to content

Instantly share code, notes, and snippets.

@Criteo-dotnet-blog
Created December 22, 2017 13:36
Show Gist options
  • Select an option

  • Save Criteo-dotnet-blog/32cfbd01d38c8d1f8cdc59e4873cb3ac to your computer and use it in GitHub Desktop.

Select an option

Save Criteo-dotnet-blog/32cfbd01d38c8d1f8cdc59e4873cb3ac to your computer and use it in GitHub Desktop.
foreach (var thread in _host.Session.Clr.Threads
    .Where(t => t.IsThreadpoolWorker)
    .OrderBy(t => (t.LockCount > 0) ? -1 : (!t.IsAlive ? t.ManagedThreadId + 10000 : t.ManagedThreadId)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment