[fpc-pascal]RTL thread safety

Matti Hamalainen mhamalai at ratol.fi
Fri Jun 8 11:55:25 CEST 2001


On Thu, 7 Jun 2001, Michael Van Canneyt wrote:

> > What parts of the RTL are NOT thread safe and why?
>
> Heap management and standard IO (read/write).
> Why ? because they use and modify global variables/structures.
>
> heap management is not yet possible to solve, standard IO can
> be solved by using the sysutils functions FileRead/FileWrite etc.

So, if I use IO only in non-threaded modules and allocate
memory similarly, I should be on relatively safe ground?

(Actually, this is how my library is currently (mostly)
implemented. Might need to do some checking though. :I )

> It is not too big, but the answer is not simple either.

Thanks for answering to my stupid questions :)

=- ccr/TNSP^pWp
] mhamalai at ratol.fi | http://www.tnsp.org/
] Show me your "realtime raytracer in Java"
] and I'll show you my CBM 8032, 2 MHz!





More information about the fpc-pascal mailing list