On Tue, 16 Jun 2009, Pritpal Bedi wrote:
Hi,
> Here is what I am having in my applactions:
[...]
> // QUESTION: pz1 is initialized in main thread and re-public(d) in another
> thread
> // because macro is compiled in main thread, pz1 referenced is from
> main thread
This is not true. You are using simple macroblocks
aadd( aMacros, &( '{|v,w,x,y,z|' + aStrings[ i ] + '}' ) )
which does not have any references. Such codeblock executed by any thread
will look for memvar variables visible in this thread not in main thread.
> // IS IT POSSIBLE THAT MACROS COMPILED IN ANYWHERE SHOULD REFER TO REDEFINED
> // IN ANOTHER THREAD ?
It's default Harbour behavior, just finish your example so it can be compiled
and executed and make some tests.
> // Though I have a very limited number of publics in my applications and I
> use the
> // above construct heavily, I am finding it difficuly how to solve this issue.
I'm sorry but so far I do not see any issue here.
Probably you are making sth else or you haven't located the real problem.
Maybe you enabled PUBLIC sharing when thread is created (default when
thread is created by xbase++ like thread class) so DefinePublics() does
not create new public variables because the original one (shared with
parent thread) are still visible.
best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour