Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
0.13.0
-
None
-
Patch Available
Description
Thread and ThreadFactory are both declared final, making impossible to extend them without duplicating or reimplementing much code.
As an example, to customize thread startup with TNonblockingServer, you need to copy or reimplement not only ThreadFactory and Thread, but also Task, Runnable and TNonblockingServer.
TNonblockingServer always creates Task instances, and Task descends from Runnable, containing a Thread pointer.
Removing final and making some methods virtual will allow everyone to customize Thread without resorting to code duplication.
Attachments
Issue Links
- links to