[fpc-pascal] Threads executing in sequence instead of parallel

Marco van de Voort marcov at stack.nl
Sat Sep 30 12:24:27 CEST 2006


> > modified demo does in fact make Linux switch between threads.  I also
> > tried the Sleep(0) you mentiond in the Sort Demo.  Sleep() didn't do
> > the trick, but using the BurnCPU() method from Demo1 did.
> 
> Ok, maybe Sleep(0) in sysutils has to use the sched_yield syscall for
> linux. This may be a feature request to be reported in bug tracker IMHO.

Ugly. Better define a procedure TryYieldTimeSlice() or so. No need to follow
Windowisms with archaic reasons.



More information about the fpc-pascal mailing list