[fpc-pascal] CheckSynchronize
vsnijders at quicknet.nl
vsnijders at quicknet.nl
Thu Jun 21 14:45:31 CEST 2007
----- Original Message -----
From: Jonas Maebe <jonas.maebe at elis.ugent.be>
Date: Tuesday, June 19, 2007 10:34 am
Subject: Re: [fpc-pascal] CheckSynchronize
>
> On 18 jun 2007, at 19:48, Vincent Snijders wrote:
>
> > Is it our fault that we call CheckSynchronize nested (i.e.
> > indirectly from a synchronized method) or is a CheckSynchronize
> not
> > smart enough not to call the synchronized method (i.e MyMessage)
> > twice, even if Synchronize is called only once for this method.
> If
> > the latter
>
> It is the latter. Nested CheckSynchronize calls are currently
> unsupported.
>
The following patch from Micha works with pfc 2.1.5:
I tried to run the test programs with fpc 2.3.1 too, but I had too much troubles
with the heapmanager to be able to test it.
Can this patch be applied?
Vincent
Index: rtl/objpas/classes/classes.inc
===================================================================
--- rtl/objpas/classes/classes.inc (revision 7729)
+++ rtl/objpas/classes/classes.inc (working copy)
@@ -177,12 +177,12 @@
if DoSynchronizeMethod then
begin
+ DoSynchronizeMethod:=false;
try
SynchronizeMethod;
except
SynchronizeException:=Exception(AcquireExceptionObject);
end;
- DoSynchronizeMethod:=false;
RtlEventSetEvent(ExecuteEvent);
end;
end;
More information about the fpc-pascal
mailing list