Creating Threads
The System::Threading namespace contains all the classes needed to create a multithreaded application. Not only does it contain the class to create and manage a thread, but there are also classes designed to work with kernel objects, thread exceptions, and synchronization issues, such as deadlocks.
The main class within the System::Threading namespace responsible for threads is the Thread class. Within the WIN32 API, when a thread was created, you had to supply a function pointer to the function that would be used for the thread's main procedure. The Thread class's constructor within the .NET Framework is similar, but rather than using a callback function, it uses a delegate. However, even though a thread is created and is associated ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access