Extending .NET Threads
Although .NET offers a unified approach to threads for all languages that target the .NET platform, there still lacks a true cohesiveness and encapsulation with regards to a thread object. By creating a small abstract base class to represent a worker thread, the ability to extend the basic thread support will prove useful when developing larger applications.
WorkerThread Class
Creating a simple abstract class to represent a worker thread is not that difficult. There are a couple of key concepts that the worker thread base class needs to provide, the first of which is the ability to associate data with a particular thread. This will allow a worker thread to be created and data for the worker thread to be specified. The next ...
Get C# and the .NET Framework: The C++ Perspective now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.