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...