What is new in multithreading in Delphi XE?
Also, in addition to what's already been mentioned:
- there's
TExternalThread
wrapper for external threads (accessible viaTThread.CurrentThread
class property). - while debugging in the IDE, you can now freeze and thaw individual threads.
- a lot of new stuff in
SyncObjs
unit: support for condition variables,TLightweightEvent
,TLightweightSemaphore
,TSpinLock
,TSpinWait
,TInterlocked
and more...
[You can set thread name: TThread.NameThreadForDebugging
.] (implemented in D2010 as David pointed out)
You can create anonymous thread (a thread that executes anonymous function and doesn't need a TThread descendant object): TThread.CreateAnonymousThread
.
Delphi threading frameworks are discussed here:
- Delphi - Threading Frameworks;
- How Do I Choose Between the Various Ways to do Threading in Delphi?