Reduce cost of LocalPop when local queue empty
authorStephen Toub <stoub@microsoft.com>
Fri, 3 Feb 2017 14:24:44 +0000 (09:24 -0500)
committerStephen Toub <stoub@microsoft.com>
Fri, 3 Feb 2017 14:25:12 +0000 (09:25 -0500)
commit70aae70a9726cd3aa4435f1cc94aadce9470236d
tree3517f82e445de48173495411b426b4aa7f169038
parentb185fe7e76a4bbef989dc69f9cec29e40d9f6f13
Reduce cost of LocalPop when local queue empty

- Change LocalPop to be parameterless and return the IThreadPoolWorkItem rather than returning a bool and having the IThreadPoolWorkItem in an out arg.
- Refactor LocalPop slightly to have an inlineable upfront check for whether the local queue is empty, and only call the non-inlineable method if there's something that could potentially be popped
src/mscorlib/src/System/Threading/ThreadPool.cs