Re: [Harbour] MT - WorkAreas - A Feature Request

2008-11-03 Thread Pritpal Bedi
Przemek >>> Why don't you want to store such unique ID in WA structure and then simply use it? <<< I intend to keep the generated number from ( ThreadID() * MAX_WA_NUM + nWA ) in MY_WADATAINIT() structure. My questions was how I am generating this number is ok or not. OR I can have a RDD wi

Re: [Harbour] MT - WorkAreas - A Feature Request

2008-11-03 Thread Przemyslaw Czerpak
On Sun, 02 Nov 2008, Pritpal Bedi wrote: Hi Pritpal, > Ho can I generate a unique number given ThreadID() and nWA ? Why don't you want to store such unique ID in WA structure and then simply use it? You are introducing solutions which at beginning creates limitations. Have you thought what will

Re: [Harbour] MT - WorkAreas - A Feature Request

2008-11-02 Thread Pritpal Bedi
Hi <<< Ho can I generate a unique number given ThreadID() and nWA ? Multplying both will clash for given two threads as nWA is reused once table is closed. >>> As maximum limit of workareas per thread is 65534, I can safely define macro as #define MYWORKAREA( nWA ) ( ThreadID() * nWA ) Am I

Re: [Harbour] MT - WorkAreas - A Feature Request

2008-11-02 Thread Pritpal Bedi
Hello <<< The relevant question: What happens when a thread is finished - its thread id is reused ? Or any new thread have unique ID? I did not experiment to check. >>> I was too fast. ThreadID() is always unique. This is good. Now the question: Ho can I generate a unique number given ThreadID()

Re: [Harbour] MT - WorkAreas - A Feature Request

2008-11-02 Thread Pritpal Bedi
Przemek <<< Probably I do not understand what you need. If you want to add unique for all thread number which is you low level table ID into each open WA then simply add it to your RDD local workarea structure and extract it: nTableNO := USRRDD_AREADATA( nWA )[ MYWA_TABLE ] and use it instead

Re: [Harbour] MT - WorkAreas - A Feature Request

2008-11-01 Thread Przemyslaw Czerpak
On Fri, 31 Oct 2008, Pritpal Bedi wrote: Hi Pritpal, > Now the real issue: > I have built the RDD on back of nWA which needs to be unique > for each table open. Now in MT every thread has common nWAs Each thread has its own poll of WA numbers not common. > and this is breaking my methodology.

Re: [Harbour] MT - WorkAreas - A Feature Request

2008-11-01 Thread Pritpal Bedi
Just not to be buried under messages :-( Pritpal Bedi wrote: > > Hello Przemek > > I am developing a RDBMS RDD (real-time) on top of USRRDD. > So far so good, thanks for this superb tool. > > Now MT is in picture, but the RDBMS communication layer is not > MT safe. I have guarded all functio