On Thu, 02 Oct 2008, Mindaugas Kavaliauskas wrote:

Hi Mindaugas.

>>     + added support for inheriting visible memvars from current
>>       thread when new thread is created. Memvars in child thread
>>       can be shared with parrent or they can be copied. See HB_THREAD_*
>>       attributes defined in hbthread.ch, f.e.:
>>          hb_threadStart( HB_THREAD_INHERIT_PUBLIC, @thFunc() )
>>       or:
>>          hb_threadStart( HB_BITOR( HB_THREAD_INHERIT_MEMVARS + ;
>>                                    HB_THREAD_MEMVARS_COPY ), ;
>>                           @thFunc() )
> I suggest to swap 1st and 2nd parameters. The main parameter of 
> hb_threadStart() is code to be executed (in any form: block, symbol or 
> function pointer), inheritance flags are only options. So, it is logic to 
> put code parameter in the first place. Flags can have a default value, and 
> if it default flags are OK, hb_threadStart(@func()) looks much better, than 
> hb_threadStart(, @func()).

But you can still use hb_threadStart(@func()) because flags are optional.
If I move them to second parameter then you have to reserve empty
item before parameters. Now execat syntax of hb_threadStart() is:

   hb_threadStart( [ <nAttr>, ] <@sStart> | <bStart> | <cStart> ;
                   [, <params,...> ] ) -> <pThID> | NIL

best regards,
Przemek
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to