> 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:[EMAIL PROTECTED]; 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? _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel