Hello together!

I'm currently working on bringing FPC's TThread implementation up to par with XE3's, but while the wiki of Embarcadero is a very important source of information I can't get everything I need from it. Thus I'd like to ask someone with access to XE3's source code (or maybe also older versions; so please write which version you used :) ) to describe (not copy!!!) how the following methods/functions are implemented:

CheckSynchronize (in respect to entries queued by TThread.Queue; see below)
TThread.CurrentThread (or more precise: TThread.GetCurrentThread)
TThread.GetIsSingleProcessor (I suspect it's just a "Result := FProcessorCount = 1")
TThread.SpinWait
TThread.TerminatedSet
TThread.CheckThreadError
TThread.NameThreadForDebugging (I don't think that we'll implement that, but I'm curious ;) )

Some further questions regarding Delphi's threading implementation:

Does CheckSynchronize walk the whole queue or just a specific amount?
What does CheckSynchronize do if an exception happens in one of the queued methods?
Does TThread.CurrentThread return something for externally created threads?
Where/How is TThread.FExternalThread set?
Where/How is TThread.FProcessorCount set?
Is RemoveQueuedMethods called if the thread terminates?

Regards,
Sven
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to