Re: [fpc-devel] Threads not working in console application

2007-12-06 Thread Yury Sidorov
From: "Graeme Geldenhuys" <[EMAIL PROTECTED]> On 06/12/2007, Yury Sidorov <[EMAIL PROTECTED]> wrote: The thread itself works, but not Synchronize() method. You need to call CheckSynchronize inside main loop. Ah, thanks Yury! That also means that having the main loop fire every 500ms (it w

Re: [fpc-devel] Threads not working in console application

2007-12-06 Thread Michael Van Canneyt
On Thu, 6 Dec 2007, Graeme Geldenhuys wrote: > On 06/12/2007, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > > > > As far as I can see, you forget to call checksynchronize in the main thread. > > > > Thanks Michael > > > BTW. There is a TThreadedTimer in the FCL, based on your code. > >

Re: [fpc-devel] Threads not working in console application

2007-12-06 Thread Graeme Geldenhuys
On 06/12/2007, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > > As far as I can see, you forget to call checksynchronize in the main thread. > Thanks Michael > BTW. There is a TThreadedTimer in the FCL, based on your code. I guess it didn't make it into FPC 2.2.0 as I searched all the sour

Re: [fpc-devel] Threads not working in console application

2007-12-06 Thread Michael Van Canneyt
On Thu, 6 Dec 2007, Graeme Geldenhuys wrote: > Hi, > > I've created a while back a thread based Timer. At the time I > developed the timer, I tested it in a Lazarus (LCL) GUI application > and everything worked perfectly. Just tested it now and it still works > fine. > > Today I tried to use

Re: [fpc-devel] Threads not working in console application

2007-12-06 Thread Graeme Geldenhuys
On 06/12/2007, Yury Sidorov <[EMAIL PROTECTED]> wrote: > > The thread itself works, but not Synchronize() method. > You need to call CheckSynchronize inside main loop. > Ah, thanks Yury! That also means that having the main loop fire every 500ms (it was just a test for the console app), my timer

Re: [fpc-devel] Threads not working in console application

2007-12-06 Thread Yury Sidorov
From: "Graeme Geldenhuys" <[EMAIL PROTECTED]> Hi, I've created a while back a thread based Timer. At the time I developed the timer, I tested it in a Lazarus (LCL) GUI application and everything worked perfectly. Just tested it now and it still works fine. Today I tried to use that Timer in

[fpc-devel] Threads not working in console application

2007-12-06 Thread Graeme Geldenhuys
Hi, I've created a while back a thread based Timer. At the time I developed the timer, I tested it in a Lazarus (LCL) GUI application and everything worked perfectly. Just tested it now and it still works fine. Today I tried to use that Timer in a Console application and a fpGUI based applicatio