ZoranPandovski / design-patterns

:briefcase: Design patterns written in different programming languages :triangular_ruler:
368 stars 310 forks source link

Add csharp thread pool example #440

Closed warrenkeil closed 2 years ago

warrenkeil commented 2 years ago

Proposed changes:

Adding an example of thread pooling using c#.

Tests:

I ran the example locally using .Net 6, to ensure it is working.

To run this file:

  1. Add a new console application using .Net 6. You can do this easily with Rider or Visual Studio
  2. Paste the following over the contents of the Program.cs file:
    
    using ThreadTest;

Console.WriteLine("Hello, starting thread pool example!"); ThreadPoolExample.DoMultiThreadedWork(); Console.WriteLine("--> Finished!");