[Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Jan Kowalski
I need to call ProcThreadPool.DoParallel with "local" procedure as a parameter. Does DoParallel allow local procedures to pass a procedural parameters ? I get err: Error: Incompatible type for arg no. 1: Got "", expected "" Best regards Tomek -- ___ La

Re: [Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Mattias Gärtner
Zitat von Jan Kowalski : I need to call ProcThreadPool.DoParallel with "local" procedure as a parameter. Does DoParallel allow local procedures to pass a procedural parameters ? I get err: Error: Incompatible type for arg no. 1: Got "", expected "" That would be really helpful. But I don't k

Re: [Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Martin
Mattias Gärtner wrote: Zitat von Jan Kowalski : I need to call ProcThreadPool.DoParallel with "local" procedure as a parameter. Does DoParallel allow local procedures to pass a procedural parameters ? I get err: Error: Incompatible type for arg no. 1: Got "", expected "" That would be really

Re: [Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Vincent Snijders
Martin schreef: Mattias Gärtner wrote: Zitat von Jan Kowalski : I need to call ProcThreadPool.DoParallel with "local" procedure as a parameter. Does DoParallel allow local procedures to pass a procedural parameters ? I get err: Error: Incompatible type for arg no. 1: Got "", expected "" That

Re: [Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Mattias Gärtner
Zitat von Vincent Snijders : Martin schreef: Mattias Gärtner wrote: Zitat von Jan Kowalski : I need to call ProcThreadPool.DoParallel with "local" procedure as a parameter. Does DoParallel allow local procedures to pass a procedural parameters ? I get err: Error: Incompatible type for arg n

Re: [Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Martin
Mattias Gärtner wrote: Zitat von Vincent Snijders : Martin schreef: Mattias Gärtner wrote: Zitat von Jan Kowalski : I need to call ProcThreadPool.DoParallel with "local" procedure as a parameter. Does DoParallel allow local procedures to pass a procedural parameters ? I get err: Error: Inc

Re: [Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Florian Klaempfl
Mattias Gärtner schrieb: Zitat von Vincent Snijders : Martin schreef: Mattias Gärtner wrote: Zitat von Jan Kowalski : I need to call ProcThreadPool.DoParallel with "local" procedure as a parameter. Does DoParallel allow local procedures to pass a procedural parameters ? I get err: Error: I

Re: [Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Mattias Gaertner
On Wed, 19 Aug 2009 17:33:59 +0200 Florian Klaempfl wrote: > Mattias Gärtner schrieb: > > Zitat von Vincent Snijders : > > > >> Martin schreef: > >>> Mattias Gärtner wrote: > Zitat von Jan Kowalski : > > I need to call ProcThreadPool.DoParallel with "local" procedure > > as a parame

Re: [Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Florian Klaempfl
Mattias Gaertner schrieb: >> You can create a thread call for local procedures, it needs some >> hacking though: no type checking is possible, you've to work with >> pointers and pass the context explicitly. > > Can you give an example? See http://www.freepascal.org/docs-html/rtl/objects/callpoin

Re: [Lazarus] local procedure - MultiThreadProc

2009-08-20 Thread Jan Kowalski
It would be great if it can be done. Thanks in advance Tomek -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] local procedure - MultiThreadProc

2009-08-20 Thread Mattias Gaertner
On Wed, 19 Aug 2009 20:52:41 +0200 Florian Klaempfl wrote: > Mattias Gaertner schrieb: > >> You can create a thread call for local procedures, it needs some > >> hacking though: no type checking is possible, you've to work with > >> pointers and pass the context explicitly. > > > > Can you give

Re: [Lazarus] local procedure - MultiThreadProc

2009-08-20 Thread Florian Klaempfl
Mattias Gaertner schrieb: On Wed, 19 Aug 2009 20:52:41 +0200 Florian Klaempfl wrote: Mattias Gaertner schrieb: You can create a thread call for local procedures, it needs some hacking though: no type checking is possible, you've to work with pointers and pass the context explicitly. Can you

Re: [Lazarus] local procedure - MultiThreadProc

2009-08-20 Thread Jan Kowalski
2009/8/20 Mattias Gaertner : > ... > Cool. It really works, at least under linux 32bit. I wonder on what > other platforms this will work. > ... Tested with two threads on dual core: Linux 64bit - works great Vista 32bit - works great and XP 32bit with two threads on single core (virtualbox) - wo