On Thu, 25 Nov 2010, Marco van de Voort wrote:

In our previous episode, michael.vancann...@wisa.be said:
Michael.
You can write a "classic" pascal textfile device driver and assign  directly
to the global TEXT variables Input, Output and ErrOutput.
Don't know is this is threadsafe, though.

No, it will not be thread-safe. You'll have to do it over and over again for
each thread.

Just curious:Why not? I thought it was safe if you flushed before you created 
threads?

Writing to the files is thread-safe, but in new threads, the file variables
are initialized from their initial main thread values, i.e. the ones without
the recapturing.

Unless I missed something ?

Michael.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to