Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/RTL/Delphi/Thread support    [ Add a report in this area ]  
Report #:  49207   Status: Closed
TThreadList wrongly named
Project:  Delphi Build #:  11.0.2627.5503
Version:    11.0 Submitted By:   Bart van Dongen
Report Type:  Minor failure / Design problem Date Reported:  7/18/2007 2:12:44 AM
Severity:    Serious / Highly visible problem Last Updated: 7/19/2007 9:32:55 AM
Platform:    All platforms Internal Tracking #:  
Resolution: As Designed (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
TTheadList is wrongly named, look at these examples:

TStringList contains string references,
TWideStringList contains WideString references,
TInterfaceList contains interface references,
TObjectList contains TObject instance references,
TComponentList contains TComponent instance references,
TClassList contains TClass references
TPopupList contains TPopupMenu instance references
...all these lists _contain_ their prefix.

Considering that, one would expect TThreadList to contain threads, but as it is now, TThreadList is actually a thread-safe TList!

I suggest to rename TThreadList to TTheadSafeList, and create a (deprecated) alias into Classes.TThreadList to retain compatibility with existing code.

Then, a real list-of-threads (named TCustomThreadList to prevent name-clashes with existing code) could be added to a unit like SyncObjs.pas

Steps to Reproduce:


Server Response from: ETNACODE01