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

2006-10-02 Thread Graeme Geldenhuys
Thanks Pete, Even though Micha did manage to explain why my demos ran as they did, I will try you demo anyway. Purely to see how big the output file grows. :-) Quick recap from Micha. The time slicing in Linux is much larger that under Windows. This improves performance (especially on calcula

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

2006-10-02 Thread Pete Cervasio
On Friday 29 September 2006 04:57, Graeme Geldenhuys wrote: > > Below is a text (console) thread demo. The one thread counts from 0 to > 1k and the other thread counts down from 1k to 0. Again, under Linux, > one thread executes and teminates, then the next thread executes and > terminates. Greet

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

2006-10-02 Thread Graeme Geldenhuys
On 29/09/06, Vincent Snijders <[EMAIL PROTECTED]> wrote: I thought in your initial mail your were talking about having a console test app with threads. Synchronize is harder then, because you have to call CheckSynchronize yourself. Vincent. Below is a text (console) thread demo. The one threa

Re: Re[2]: [fpc-pascal] RE: Threads executing in sequence instead of parallel

2006-09-29 Thread Graeme Geldenhuys
On 29/09/06, Пётр Косаревский <[EMAIL PROTECTED]> wrote: > I would first port one or > two of the top 10 threading applications that was submitted to Borland > in a Threading Contest which Borland held in 2002. Search Borland's > CodeCentral or I could post the link. There are some good threadin

Re[2]: [fpc-pascal] RE: Threads executing in sequence instead of parallel

2006-09-29 Thread Пётр Косаревский
> I would first port one or > two of the top 10 threading applications that was submitted to Borland > in a Threading Contest which Borland held in 2002. Search Borland's > CodeCentral or I could post the link. There are some good threading > examples available. :-) I have troubles searching. Pl

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

2006-09-29 Thread Marc Santhoff
Am Freitag, den 29.09.2006, 19:00 +0200 schrieb Graeme Geldenhuys: > Thanks Jason - I don't recall you mentioning what platform you are > working on, but I gather in is some *nix platform. The only thing you > just proofed with your post is - threading is not working correctly! > > There shouldn'

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

2006-09-29 Thread Graeme Geldenhuys
Thanks Jason - I don't recall you mentioning what platform you are working on, but I gather in is some *nix platform. The only thing you just proofed with your post is - threading is not working correctly! There shouldn't be a need for workarounds like suspending threads to get others to work. T

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

2006-09-29 Thread memsom
Some rambling observations: > I was fighting the serial execution - and then I ran that little tiny test > program - and it worked. I tried to fix my code some more - same problem - > but the little test program worked... so I finally (this is what I mean > when > I say I resigned to design chang

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

2006-09-29 Thread Jason P Sage
Hi - I read enough of this topic to compel me to respond. I have been working with Multi-threading in Free Pascal for a only a month or so now and I learned a great deal - and I have resigned to accepting there are design considerations I have had to adopt to get the results I wanted - that some

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

2006-09-29 Thread Graeme Geldenhuys
On 29/09/06, Vincent Snijders <[EMAIL PROTECTED]> wrote: All gui stuff I run on windows. Non visual test apps, I can run on linux too. If I really want I could do GUI in linux too, but I don't know too much about gtk and I rather spent time on improving things on the windows platform. No prob

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

2006-09-28 Thread Vincent Snijders
Graeme Geldenhuys schreef: On 28/09/06, Vincent Snijders <[EMAIL PROTECTED]> wrote: I know about this report: http://www.freepascal.org/mantis/view.php?id=1906 Threading related, but not the same, as you are not using synchronize, are you? Vincent Do you mean like below - which then means, I

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

2006-09-28 Thread Graeme Geldenhuys
What is also very interresting, which I thought I would share. I added three more Bubble Sort columns to my test app (total of 6 sort threads - knowing bubble sort is the slowest). I then created all 6 threads suspended (t1 thru t6 in order). I then resumed the threads in the order t1, t6, t2 t

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

2006-09-28 Thread Graeme Geldenhuys
On 28/09/06, Vincent Snijders <[EMAIL PROTECTED]> wrote: I know about this report: http://www.freepascal.org/mantis/view.php?id=1906 Threading related, but not the same, as you are not using synchronize, are you? Vincent Do you mean like below - which then means, I do use synchronize. I use

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

2006-09-28 Thread Vincent Snijders
Graeme Geldenhuys wrote: Ok, I have tried this under Windows and Linux, with FPC 2.0.2, 2.0.4 and 2.1.1. I have tested this on 4 different machines all with the same outcome. Is any body else using threading in their applications? Are you experiencing the same issues under Linux? If so, I wil

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

2006-09-28 Thread Graeme Geldenhuys
Ok, I have tried this under Windows and Linux, with FPC 2.0.2, 2.0.4 and 2.1.1. This seems to only be a problem under Linux. Threading works fine under Windows (via WINE or native), but is screwed under Linux native! Under Linux, it has been tested with 2.0.4 and 2.1.1 (I saw no point testing it