Re: [fpc-pascal] THashedStringList vs TFPHashTable

2006-09-28 Thread Graeme Geldenhuys
On 28/09/06, Dean Zobec [EMAIL PROTECTED] wrote: It's a typical use. Choose an appropriate HashTableSize when creating the container (approx.the number of the elements you are going to store or more), you can test it with different hash functions and see through the statistics which one is

[fpc-pascal] Threading support under FPC

2006-09-28 Thread Graeme Geldenhuys
Hi, How good is the threading support in Free Pascal? I'm using 2.1.1. I haven't used threading before under FPC and am about to revamp an in-house application to support mutliple threads. I don't want to start the app and then find out that there is some major stability issues with threading

Re: [fpc-pascal] Threading support under FPC

2006-09-28 Thread Marco van de Voort
How good is the threading support in Free Pascal? I'm using 2.1.1. I haven't used threading before under FPC and am about to revamp an in-house application to support mutliple threads. I don't want to start the app and then find out that there is some major stability issues with threading

Re: [fpc-pascal] Threading support under FPC

2006-09-28 Thread Пётр Косаревский
Hi, How good is the threading support in Free Pascal? I'm using 2.1.1. I haven't used threading before under FPC and am about to revamp an in-house application to support mutliple threads. I don't want to start the app and then find out that there is some major stability issues with

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

2006-09-28 Thread Marco van de Voort
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

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

2006-09-28 Thread Graeme Geldenhuys
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 random

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

2006-09-28 Thread Graeme Geldenhuys
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,

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

2006-09-28 Thread Graeme Geldenhuys
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

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

2006-09-28 Thread Vincent Snijders
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

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

2006-09-28 Thread Graeme Geldenhuys
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

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

2006-09-28 Thread Graeme Geldenhuys
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

[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

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

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