Category Archives: Multithreading

Multithreading – SemaphoreSlim

By | 01/03/2023

In this post, we will see what is SemaphoreSlim and how we can use it.But first of all, what is SemaphoreSlim?From Microsoft web site:“The SemaphoreSlim class represents a lightweight, fast semaphore that can be used for waiting within a single process when wait times are expected to be very short. SemaphoreSlim relies as much as possible… Read More: Multithreading – SemaphoreSlim »

Multithreading – How to return a value from a Thread

By | 13/10/2021

In this post, we will see how to return a value from a Thread. First of all, we create a new Console application project where we define three methods called Method1, Method2 and Method3: Then, we modify the Main method in order to run the first two methods in different Threads: If we run the… Read More: Multithreading – How to return a value from a Thread »