Hello Przemek

In GTWVT | GTWVG we have this function:

static PHB_GTWVT hb_gt_wvt_Find( HWND hWnd )
{
   int iCount = s_wvtCount, iPos = 0;
   PHB_GTWVT pWVT = NULL;

   HB_WVT_LOCK
   while( iCount && iPos < WVT_MAX_WINDOWS )
   {
      if( s_wvtWindows[ iPos ] )
      {
         if( s_wvtWindows[ iPos ]->hWnd == hWnd )
         {
            pWVT = s_wvtWindows[ iPos ];
            break;
         }
         --iCount;
      }
      ++iPos;
   }
   HB_WVT_UNLOCK

   return pWVT;
}

As this function just reads the static array, 
can we avoid HB_WVT_LOCK | UNLOCK calls ?

It sppeds up the things considerably.
But I do not know the fatalitites in real life.

Regards
Pritpal Bedi

-- 
View this message in context: 
http://www.nabble.com/GTWVT-%7C-WVG---Question-about-Mutex-tp23329155p23329155.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.

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

Reply via email to