Mattias Gaertner schrieb:
On Thu, 31 Jul 2008 11:02:28 +0200
Florian Klaempfl <[EMAIL PROTECTED]> 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.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to