[fpc-pascal] cthreads
Sven Barth
pascaldragon at googlemail.com
Sun Jul 27 14:39:58 CEST 2014
On 27.07.2014 11:39, Mark Morgan Lloyd wrote:
> Sven Barth wrote:
>> On 26.07.2014 19:50, leledumbo wrote:
>>>> Because then all apps are linked to it, also the ones that don't need
>>> threads. Same for clocale and cwstrings.
>>>
>>> If the widestring manager could be made by ourselves, is it possible for
>>> thread manager as well?
>>
>> Principiall yes, but the problem here would be external code that the
>> program links to. E.g. Wine did something like this some time ago
>> (before they switched to pthreads) and needed to simulate some
>> structures so that libc switches to multithreaded mode... So if we
>> have Pascal only code (like the compiler) this would work without big
>> problems (if someone implements it of course ;) ), but if you have 3rd
>> party code not written in FPC then problems might arise...
>
> On the other hand, if somebody's linking in "alien" code then he should
> make himself aware of aware of the prerequisites, particularly since the
> threads are more likely to be in the main program (i.e. stuff that he's
> written) than in the library he's pulling in.
That's not true. E.g. the Qt libraries happily create threads for
various background stuffs.
Regards,
Sven
More information about the fpc-pascal
mailing list