Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-09

thread

4 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Chemistry.rd

From: Dancso Andras
Subject: thread

Question: How can I start a new thread from FreePascal under Win32?

Thank you very much for your help.
Dancso Andras

James Mills
to Chemistry.rd
Chemistry.rd wrote
From: Dancso Andras Subject: thread Question: How can I start a new thread from FreePascal under Win32?

I think it might be platform independent. If that's the case there's a nice example in the FCL source. Not sure if there's an example in the demos, might be :)

cheers
James

- -Zero Defect Software Engineers Group - ZDSEG - -You need only two tools. WD-40 and duct tape. -If it doesn't move and it should, use WD-40. -If it moves and shouldn't, use the tape.
Evergray
to James Mills

Hello James,

Tuesday, September 2, 2003, 12:57:34 PM, you wrote:

Chemistry.rd wrote
> From: Dancso Andras > Subject: thread > > Question: How can I start a new thread from FreePascal under Win32?

You may create descendat from TThread class & place u'r code in overrided procedure Execute. See \examples\fcl\threads.pp, but don't pay too mach attention at how this example works because it seems to be unstable under Windows 2000 (at least). I think that console output is not thread safe part of FP I/O system.

Apropos, test thread program I wrote runs under Win32 without any problem, but crashes under Linux (fpc 1.0.10). %-\

JM> I think it might be platform independent. If that's the case there's a JM> nice example in the FCL source. Not sure if there's an example in the JM> demos, might be :)

JM> cheers
JM> James

WBR, Evergray

Words mean nothing...
Peter Vreman
to Evergray
you wrote 18 lines
Hello James, Tuesday, September 2, 2003, 12:57:34 PM, you wrote: JM> On Tue, Sep 02, 2003 at 09:56:18AM +0200, Chemistry.rd wrote: >> From: Dancso Andras >> Subject: thread >> >> Question: How can I start a new thread from FreePascal under Win32? You may create descendat from TThread class & place u'r code in overrided procedure Execute. See \examples\fcl\threads.pp, but don't pay too mach attention at how this example works because it seems to be unstable under Windows 2000 (at least). I think that console output is not thread safe part of FP I/O system. Apropos, test thread program I wrote runs under Win32 without any problem, but crashes under Linux (fpc 1.0.10). %-\

Threads are not supported under 1.0.x

Peter