[fpc-devel] Russian locale information not compatible with FPClocale variables
Marco van de Voort
marcov at stack.nl
Wed Jul 30 17:48:25 CEST 2008
> Eg only allow the parallel or async keyword (I personally do not care
> which) on an otherwise normal procedure and then another
> procedure/keyword isfinished(x)? which checks whether the 'parallel'
> procedure x has finished. With minimum (ie no) checking for whether the
> procedure uses global data. It wouldn't be foolproof but would be easily
> usable, wouldn't it.
How many of these cases do you already have? Because it is nothing more than
a threadstart and a thread.waitfor (or some more involved), something like
procedure something.buttonclick;
var thr :TSyncthread;
begin
thr:=poolmgr.getblockedthread; // get a thread from the pool.
thr.proc:=@someprocedure;
thr.run
<do other stuff>
thr.waitforsignal; // also returns to pool.
end;
You could define a helper even for the first three lines.
Now unless you have something like this under every event already, it is not
worth the effort. It's a shortcut for something that is already possible,
and if you don't use it now, you apparantly don't need it that much?
More information about the fpc-devel
mailing list