Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-23 Thread Philippe Lévi
what you want to do makes sense? I don't think so. Thread code "may not" access stack values of calling code ... De: fpc-pascal-boun...@lists.freepascal.org em nome de silvioprog Enviado: segunda-feira, 23 de fevereiro de 2015 15:32 Para: FPC-Pascal users dis

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-23 Thread silvioprog
On Mon, Feb 23, 2015 at 4:39 PM, Sven Barth wrote: > On 23.02.2015 20:29, silvioprog wrote: > >> On Mon, Feb 23, 2015 at 4:24 PM, Philippe Lévi > > wrote: >> >> may be I do not catch it well ... problem with my english understan >> ... may be. "we'll get" ..

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-23 Thread Philippe Lévi
I "thought" it was not possible to use local procedure address as parameter like in queue( @SyncOnPrint); as Clecio showed ... De: fpc-pascal-boun...@lists.freepascal.org em nome de Sven Barth Enviado: segunda-feira, 23 de fevereiro de 2015 15:23 Para:

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-23 Thread silvioprog
On Mon, Feb 23, 2015 at 3:23 PM, Sven Barth wrote: [...]=== code begin === > > procedure TMyThread.Execute; > var > s: String; > > procedure SyncOnPrint; > begin > fOnPrint(s); > end; > > begin > s := 'Hello World'; > Queue(@SyncOnPrint); > end; > > === code end === How to compi

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-23 Thread Graeme Geldenhuys
On 2015-02-23 11:25, Michael Schnell wrote: > Let me know if you want to have it. Yeah please. You can email it to this email address. > I once wrote a documentation on how the event queue in the fpc RTL > works, but failed with the attempt to have it included in the fpc help. Why not add it t

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-23 Thread Marcos Douglas
On Mon, Feb 23, 2015 at 2:44 PM, Graeme Geldenhuys wrote: > On 2015-02-23 10:56, Mattias Gaertner wrote: >> Synchronize waits for the main thread. >> Queue does not. >> Both are executed by the main thread via CheckSynchronize. >> Both are useful. > > > Many thanks for that info. It makes sense no

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-23 Thread Graeme Geldenhuys
On 2015-02-23 10:56, Mattias Gaertner wrote: > Synchronize waits for the main thread. > Queue does not. > Both are executed by the main thread via CheckSynchronize. > Both are useful. Many thanks for that info. It makes sense now. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-23 Thread Graeme Geldenhuys
On 2015-02-23 10:52, Michael Schnell wrote: > TThread.Queue works very similar to Application.QueueAsyncCall in the LCL I don't use LCL, so I'm not familiar with all its features. > Obviously TThread.Queue does not hamper the firing thread, while > TThread.Synchronize stalls it for an undefined

Re: [fpc-pascal] Differences between ppc386 and ppcross386

2015-02-23 Thread Mattias Gaertner
On Mon, 23 Feb 2015 12:02:52 +0100 Jonas Maebe wrote: > > On 23 Feb 2015, at 11:40, Mattias Gaertner wrote: > > > What are the differences between ppc386 and ppcross386? > > ppcross386 gets compiled as part of a cross build (e.g. when > performing "make all OS_TARGET=win32" on a Linux/i386 m

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-23 Thread Michael Schnell
On 02/23/2015 11:08 AM, Graeme Geldenhuys wrote: I've look at FPC trunk and see we now have a Queue() implementation, and I adjusted a simple multi-threaded GUI example app I had. But I still don't really understand what is the benefit of Queue vs Synchronise. I still had to create a "synchronis

Re: [fpc-pascal] Differences between ppc386 and ppcross386

2015-02-23 Thread Jonas Maebe
On 23 Feb 2015, at 11:40, Mattias Gaertner wrote: What are the differences between ppc386 and ppcross386? ppcross386 gets compiled as part of a cross build (e.g. when performing "make all OS_TARGET=win32" on a Linux/i386 machine), but other than that it is the same as ppc386. The reason i

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-23 Thread Mattias Gaertner
On Mon, 23 Feb 2015 10:08:45 + Graeme Geldenhuys wrote: > Hi, > > I've recently seen some posts in Delphi groups that the preferred way is > to use TThread.Queue instead of TThread.Synchronize. > > Why is that? What are the benefits? Synchronize waits for the main thread. Queue does not. B

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-23 Thread Michael Schnell
On 02/23/2015 11:08 AM, Graeme Geldenhuys wrote: Hi, I've recently seen some posts in Delphi groups that the preferred way is to use TThread.Queue instead of TThread.Synchronize. TThread.Queue just "fires" an Event in the main thread. This means a "mark" is set that the event handler function i

[fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-23 Thread Graeme Geldenhuys
Hi, I've recently seen some posts in Delphi groups that the preferred way is to use TThread.Queue instead of TThread.Synchronize. Why is that? What are the benefits? I've look at FPC trunk and see we now have a Queue() implementation, and I adjusted a simple multi-threaded GUI example app I had.

[fpc-pascal] Differences between ppc386 and ppcross386

2015-02-23 Thread Mattias Gaertner
Hi, What are the differences between ppc386 and ppcross386? Related question: When calling "fpc -Pi386" it searches for ppc386, but not for ppcross386. Why is that? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepa