[fpc-devel] StdOut capture for FPC RTL
anton.k at tut.by
Thu Nov 25 11:42:50 CET 2010
?? 25.11.2010 12:39, Marco van de Voort ???????(??):
> In our previous episode, Anton Kavalenka said:
>>> On 25 Nov 2010, at 10:52, Anton Kavalenka wrote:
>>>> Due to incompatibility of RTL between FPC and Delphi my capturing
>>>> tricks not work.
>>>> BTW what the real reason to make these files as threadvar?
>>> To prevent multiple threads writing to stdin/stdout/sterr at the same
>>> time from corrupting each other's data (all of these text files use an
>>> internal buffer, even when the output is immediately flushed afterwards).
>> // do something nasty with the buffer
>> There is NO other runtimes on this planet instead FPC RTL which take
>> care of per-thread buffer of output.
>> It is programmers duty to lock/flush buffer in multithreaded environments.
> Such solutions are fine for slow apps, but in a fast pace, app, this means
> that the logging with its locks has a significant impact on the behaviour of
> the application.
> And IMHO the RTL should be workable for all kinds of apps.
> fpc-devel maillist - fpc-devel at lists.freepascal.org
OK, let's replace threadvar for those variables with var.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel