Peter N Lewis wrote:
As I have already read in archives, thread support in GPC is missing now. I know that I can "feel free to implement it myself" but, unfortunately, I am rather a compiler user than a creator, I'm not a such guru (at least, for the time being).
The good news is that most critical part are in the RTS which is more or less normal Pascal (mostly) and C (a bit) code. Just look for global variables etc. there.
Is there any thread safe issues if the no RTS units are included specifically? We use GPC for a heavily threaded application that has been shipping for some time and have never had any problems, but it is Mac OS X only and we don't use any of the RTS except that built in to the compiler.
As I said, files use a few global variables. Other parts (also used automatically by the compiler) might, but I've never checked them.
I've also never checked the compiler generated code for such cases. Initializers use global flags, but since I suppose threading usually starts after initializers are run, this should be no problem.
Frank