On Wed, 03 Feb 2010, Lorenzo Fiorini wrote:
> Here is the final code:
>          begin sequence with { |e| logerror( e, oResponse, cBinFile ) }
>             if !empty( pHRB := hb_hrbload( cBinFile ) )
>                if !empty( sFunc := hb_hrbGetFunSym( pHRB, "HRBMAIN" ) )
>                   xResult := sFunc:exec()
>                endif
>                if ISCHARACTER( xResult )
>                   oResponse:Flush( 200, "OK",, xResult )
>                endif
>             endif
>          endsequence
> 
> and here is the test.prg:
> 
> static function hrbmain()
> return nil
> 
> Note that I define some publics inside the processcall that I need to
> manipulate request and response in the hrb.
> Could it be the source of the problem?
No. By default all memvars (PUBLIC and PRIVATE) variables are separated
between threads and each threads starts with its own clean set of memvars.
If you want to change it then you can use thread attributes in
hb_threadStart() function. See hbthread.ch and code example in
tests/mt/mttest08.prg if you are interested in it.
See "MULTI THREAD SUPPORT" in doc/xhb-diff.txt. I documented shared
and inherited thread resources in Harbour.

best regards,
Przemek
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to