I was wondering on the affects if my previous post was re-written to remove the use of TPL and just use the standard threading classes in the framework instead, would the performance be different.
So the previous post was using the following code:
When the limited concurrency scheduler is initialised with a number greater than or equal to the number of logical processors then the CPU hits 100% and the app stalls and stutters.
If this is re-written without the use of TPL would I get the same results?
Re-writing this produced the following code, using a Semaphore to control the number of concurrent threads:
In answer to the question, you get exactly the same behaviour, there is no benefit in not using TPL to handle the concurrency - good :)
So the previous post was using the following code:
When the limited concurrency scheduler is initialised with a number greater than or equal to the number of logical processors then the CPU hits 100% and the app stalls and stutters.
If this is re-written without the use of TPL would I get the same results?
Re-writing this produced the following code, using a Semaphore to control the number of concurrent threads:
In answer to the question, you get exactly the same behaviour, there is no benefit in not using TPL to handle the concurrency - good :)
Comments
Post a Comment