Marco van de Voort wrote:
>> 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.
Yes ag
> > 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 m
Graeme Geldenhuys wrote:
> pointed out). This sounds like an interesting topic and something
> work understanding. After all, it gave me enough headaches and a
> false positive - thinking it is a bug.
Btw, here is a quote from the interview, default length seems to be
150ms: (it also explains th
Graeme Geldenhuys wrote:
> Ah, finally some explanation that makes sence! Thanks Micha, your
> 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.
O
On 29/09/06, Micha Nelissen <[EMAIL PROTECTED]> wrote:
There is no bug. The time slice management is simply different. Try
attached demo (it's your demo modified). You will notice that output
will be mixed.
Linux simply gives longer timeslices to threads (for efficiency reasons).
Micha
Ah, f
Graeme Geldenhuys wrote:
> The Sort Demo, which is a port of the Threads demo included with
> Delphi 7, shows this clearly. I can archive and post the source, but
Try inserting some Sleep(0) to force the kernel to switch to another
thread ? In real worker threads you wouldn't do this of course, b
Graeme Geldenhuys wrote:
> We have a problem!!!
>
> The test project /fcl/tests/threads.pp as well as a Sort Demo (Bubble,
> Section and Quick Sort) all execute the threads in sequence, waiting
> for the previous thread to complete, before the next one executes.
> Kind of defeats the point of usin
So far using FPC 2.0.2 and 2.0.4 and latest Lazarus (svn) it works
fine under Windows. I am now busy building FPC 2.1.1 (svn) under
Windows and will redo the whole process. Will post the result
shortly
Regards,
- Graeme -
On 28/09/06, Vincent Snijders <[EMAIL PROTECTED]> wrote:
Graeme G
The only FPC/Lazarus for windows I have is under the same VMWare
session as I used for Delph 7. And yes it works there, using FPC
2.0.2 with a Lazarus 0.9.15 (9152). I'll be at home in a hour, so
then I can try under FPC 2.1.1 and latest Lazarus.
Regards,
- Graeme -
On 28/09/06, Vincent Snij
Graeme Geldenhuys wrote:
Just to give some more feedback. Using that same Sort App, I compiled
it under Delphi 7, and ran it under Linux using WINE and the threading
worked correctly. So somewhere in FPC or Lazarus lies the problem.
Yeah I know, not very specific. :-)
Can you try running the
Just to give some more feedback. Using that same Sort App, I compiled
it under Delphi 7, and ran it under Linux using WINE and the threading
worked correctly. So somewhere in FPC or Lazarus lies the problem.
Yeah I know, not very specific. :-)
Graeme.
On 28/09/06, Graeme Geldenhuys <[EMAIL P
Attached is the Sort Demo - for incase you have Lazarus.
Graeme.
On 28/09/06, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote:
ok, I see hundreds of a's - press b and quite a bit later I see
hundreds of b's.
Do you have lazarus? I can then post the Sort Demo to show that one as well.
Regards,
ok, I see hundreds of a's - press b and quite a bit later I see
hundreds of b's.
Do you have lazarus? I can then post the Sort Demo to show that one as well.
Regards,
- Graeme -
On 28/09/06, Marco van de Voort <[EMAIL PROTECTED]> wrote:
> The test project /fcl/tests/threads.pp
I see rando
> The test project /fcl/tests/threads.pp
I see random alteration of a and b here.
> The threads.pp test project in fcl, shown a lot of a's on the screen
> and after a while, starts displaying b's on the screen. Looking at
> the source, I gather the a's and b's are supposed to be mixed as each
>
We have a problem!!!
The test project /fcl/tests/threads.pp as well as a Sort Demo (Bubble,
Section and Quick Sort) all execute the threads in sequence, waiting
for the previous thread to complete, before the next one executes.
Kind of defeats the point of using threads.
The Sort Demo, which is
15 matches
Mail list logo