[fpc-devel] Multithreading under DOS
pascaldragon at googlemail.com
Thu Sep 26 15:30:03 CEST 2013
On 26.09.2013 14:23, Tomas Hajny wrote:
> On Thu, September 26, 2013 14:11, Sven Barth wrote:
>> On 26.09.2013 13:28, Tomas Hajny wrote:
>>> On Thu, September 26, 2013 11:55, Michael Schnell wrote:
>>>> In fact here seems to be a library that might be usable:
>>> All of your links refer to Unix (or even explicitly Linux). Even just
>>> definition of "kernel space" and "user space" gives different results
>>> DOS and POSIX. Moreover, then end of
>>> suggests that pre-emptive multithreading is hardly possible (if at all)
>>> with pure user space implementation; FPC TThread design is based on an
>>> assumption of a pre-emptive multithreading.
>> Well, we do have a TThread.Yield procedure since the last time I worked
>> on TThread :)
> Well, that is nice, but I haven't seen a statement (with an appropriately
> big exclamation mark ;-) ) about all started threads using this API being
> required to call this procedure regularly...
I believe that we can agree that if someone wants to port an application
to a system that provides only cooperative multithreading that he/she
needs to ensure that his/her threads call Yield regularly. :) Afterall
our main targets are preemptive ones...
More information about the fpc-devel