Multi threading support was Re: [fpc-devel] Russian locale information not compatible withFPClocale variables

Florian Klaempfl florian at freepascal.org
Thu Jul 31 11:26:58 CEST 2008


Mattias Gaertner schrieb:
> On Thu, 31 Jul 2008 11:02:28 +0200
> Florian Klaempfl <florian at freepascal.org> wrote:
> 
>> Before we discuss endless about useless stuff, I'll make a proposal
>> for a first addition: support of the synchronized keyword. It does no
>> more than protecting a procedure automatically by a critical section
>> so only one thread can enter it. But I want to extend it. First, it
>> can be applied also to classes and object:
>>
>> tmyclass = class(...) synchronized
>>
>> This means that all classes synchronize against one critical section.
> 
> Do you mean one global crit sect per class (and descendants) 

Per class. The question is if it's possible to do this per class 
instance too.

> or one
> global crit sect for all classes?
> 
>  
>> Further, it allows an additional symbol to be given
>>
>> procedure p;synchronized mycriticialsection;
>>
>> it must be of the type System.TRTLCriticalSection and the procedure
>> will be synchronized against this critical section.
> 
> Will this also allowed for methods?

Yes.



More information about the fpc-devel mailing list