Hi Przemek,

Il 17/12/2008 17.53, Przemyslaw Czerpak ha scritto:
Hi Pritpal and others,

If you are using complex variables like array or hashes and you want to make
their separated copies then you have to initialize aFld inside the thread or
clone aFld body when thFunc starts.

I thought about your mail again and if this is a real problem and you think
it will confuse users then I can change the initialization code for thread
static variables so complex items like arrays or hashes will be "cloned"
instead of coping so each thread will receive it's own copy of data declared
by user in source code with all nested structures also copied.
For me current behavior is natural but because I know quite well VM internals
then my opinion may be different then other Harbour users. If you prefer
cloning then I'll change it.

It could be useful in both way IMO, so it could be interesting if it can be used as auto-cloned in standard way and work referenced if BYREF (or similar name) option is defined.

thread BYREF static aFld := { { '', 0 } }


Best Regards

Francesco
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to