On Fri, 31 Jul 2009, Francesco Saverio Giudice wrote:

Hi,

> ok, thank you.

Yet another advice.
Add to Handler_HrbScript() just after:

   CATCH oError

this line:

   hb_mutexUnlock( s_hmtxHRB )

otherwise error in one .hrb script blocks all other threads so they
cannot execute any .hrb script.

or better make it in cleaner way and change the code:

      IF hb_mutexLock( s_hmtxHRB )
         [...]
         hb_mutexUnlock( s_hmtxHRB )
      ENDIF

to:

      IF hb_mutexLock( s_hmtxHRB )
         BEGIN SEQUENCE
            [...]
         ALWAYS
            hb_mutexUnlock( s_hmtxHRB )
         ENDSEQUENCE
      ENDIF

Such version also catch QUIT event's and it's safe for recursive calls.

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

Reply via email to