Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-05 Thread Przemyslaw Czerpak
On Fri, 05 Jun 2009, Mindaugas Kavaliauskas wrote: Hi, > Clipper compatibility could be reached, even if we decide to drop [] > support for objects. o[1], o[2], ... could be emulated using [] operator > overload even for an object with a different internal structure from > Clipper. I was thin

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-05 Thread Mindaugas Kavaliauskas
Hi, The object in XPP is not an array, at least it cannot be accessed using [] operator and IMHO it's quite good idea because it introduce some encapsulation which allows to eliminate some code used to validate object structure at runtime. Maybe we should also think about adding such extensions

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-05 Thread Szakáts Viktor
For me coffee.prg works prefectly. Nice demo, and thanks to Przemek for making it work with Harbour as is. It works exactly like in xbase++ after: 2009-06-05 06:10 UTC+0200 Przemyslaw Czerpak (druzus/at/ priv.onet.pl) before it was difference in unlocking sync method by :wait() and Pritpal w

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-05 Thread Przemyslaw Czerpak
On Fri, 05 Jun 2009, Szak�ts Viktor wrote: Hi, > For me coffee.prg works prefectly. Nice demo, and thanks to > Przemek for making it work with Harbour as is. It works exactly like in xbase++ after: 2009-06-05 06:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) before it was difference

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-05 Thread Viktor Szakáts
For me coffee.prg works prefectly. Nice demo, and thanks to Przemek for making it work with Harbour as is. I had to add these liness to the top of coffee.prg: --- #xtranslate dispoutat() => hb_dispoutat() #xtranslate sleep() => xpp_sleep() #include "hbclass.ch" --- and build with: hbmk2 coffee.p

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-05 Thread Pritpal Bedi
Hello Przemek > So far each synchronization/MT mechanism in xbase++ we analyzed > adding some xbase++ compatible extensions to Harbour does not work > exactly like in their documentation. Everywhere tests shows some > differences or anomalies. I do not want to guess which one are > intentional

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-05 Thread Przemyslaw Czerpak
On Thu, 04 Jun 2009, Pritpal Bedi wrote: Hi, > Sorry if something has caused you inconvinience. > I had just sent to the list Xbase++ published documents > to better understand MT modal. And thank you for it. Sorry if you found my previous message sounded rude. Just simply I cannot understand ho

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-04 Thread Pritpal Bedi
Hello Przemek Sorry if something has caused you inconvinience. I had just sent to the list Xbase++ published documents to better understand MT modal. Here are the results of your sent program. C:\harbour\tests>hbmk2 prz -mt -n hbmk: Processing configuration: C:\HARBOUR\BIN\hbmk.cfg Harbour 1.

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-04 Thread Przemyslaw Czerpak
On Wed, 03 Jun 2009, Pritpal Bedi wrote: Hi, > For the last three hours I am trying to reach some results > by applying your code with more permutations and combinations. > So far I have not reached any solution. > The first observation is that METHOD :enter() SYNC is not working > as synchroniz

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-03 Thread Pritpal Bedi
Hello Przemek For the last three hours I am trying to reach some results by applying your code with more permutations and combinations. So far I have not reached any solution. The first observation is that METHOD :enter() SYNC is not working as synchronized. A startup only one programmer should

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-03 Thread Przemyslaw Czerpak
On Wed, 03 Jun 2009, Pritpal Bedi wrote: Hi, > After compiling the coffee.prg as in original post with > Harbour and Xbase++ I see the noticeable difference. > Any programmer is able to fill the cup while coffee machine is still > preparing for the cofee. I mean Signal() | Wait() are not workin

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-03 Thread Pritpal Bedi
Hello Przemek After compiling the coffee.prg as in original post with Harbour and Xbase++ I see the noticeable difference. Any programmer is able to fill the cup while coffee machine is still preparing for the cofee. I mean Signal() | Wait() are not working as in Xbase++. ::coffeeIsReady:sign

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-03 Thread Viktor Szakáts
>>There are detailed articles about the internals, and the >>details aren't very simple or straighforward. Probably similar >>could be done with Harbour, but it's out of the scope of the >>core language and it's a different topic than multithreading. > > Thread in Harbour is eat much less memory th

RE: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-03 Thread Horodyski Marek (PZUZ)
>-Original Message- >From: Viktor Szakáts [mailto:harbour...@syenar.hu] >Sent: Wednesday, June 03, 2009 10:25 AM >To: Harbour Project Main Developer List. >Subject: Re: [Harbour] MT - Xbase++ - A Code Snippet ... >There are detailed articles about the internals, and th

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-03 Thread Viktor Szakáts
>>Both single-thread and multi-thread application is one >>process. You should look to "Threads" column to see the number >>of running threads. > > When I see on Chrome, it has one app and multi process. Harbour app is > one proces and multi app. > On Win of course. That is because you picked one

RE: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-03 Thread Horodyski Marek (PZUZ)
>-Original Message- >From: Mindaugas Kavaliauskas [mailto:dbto...@dbtopas.lt] >Sent: Tuesday, June 02, 2009 11:20 PM >To: Harbour Project Main Developer List. >Subject: Re: [Harbour] MT - Xbase++ - A Code Snippet ... >Both single-thread and multi-thread application is

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-02 Thread Viktor Szakáts
>> I'll add SLEEP() in next commit. > > Thanks but I do not think it's good idea to have such function xbase++ > compatible in core code. > XBASE++ uses delay given in 1/100 of second (10 milliseconds) and it's > probably caused by historical reasons - precision inherited from OS2 > DosSleep() func

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-02 Thread Pritpal Bedi
Hello Przemek Przemyslaw Czerpak-2 wrote: > > In Harbour all threads are executed on each available CPUs. > It's default behavior of most OS-es and Harbour does not make > anything to disable it and reduce scalability. I have no idea > how it's presented in windows task manager. > If you have m

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-02 Thread Przemyslaw Czerpak
On Tue, 02 Jun 2009, Szak�ts Viktor wrote: Hi, > I'll add SLEEP() in next commit. Thanks but I do not think it's good idea to have such function xbase++ compatible in core code. XBASE++ uses delay given in 1/100 of second (10 milliseconds) and it's probably caused by historical reasons - precisi

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-02 Thread Mindaugas Kavaliauskas
Hi, Is it possible in Harbour that if the code below is executed on a multi cpu machine, we could see the multiple PIDs in the task manager. I mean is is possible to execute threads on multiple CPUs ? I have no idea how it's presented in windows task manager. Both single-thread and multi-t

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-02 Thread Vagelis Skarmaliorakis
Hi Pritbal, In the past i had send a mail at alaska software to ask how i could attach threads to a specific cpu. The answer was that they had removed that feature because it caused many problems. If i find that mail i will post it here. Regards Vagelis -- View this message in context: http://

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-02 Thread Viktor Szakáts
On Windows PID is Process ID and one Harbour executable always runs as one PID. To run something under multiple PIDs, just run multiple copies of your program. An Harbour MT program with multiple threads will run each thread under a different TID which is Thread ID. I'll add SLEEP() in next commi

Re: [Harbour] MT - Xbase++ - A Code Snippet

2009-06-02 Thread Przemyslaw Czerpak
On Fri, 29 May 2009, Pritpal Bedi wrote: Hi, > Is it possible in Harbour that if the code below is executed on a multi cpu > machine, > we could see the multiple PIDs in the task manager. I mean is is possible to > execute threads on > multiple CPUs ? In Harbour all threads are executed on eac