Hi,

one more thread question:

STATIC mtx := hb_mutexCreate()

Thread1:
  LOCAL xI
  xI := some_value
  hb_mutexNotify(mtx, xI)
  xI := NIL // or xI := another_value

Thread2:
  LOCAL xI, xParam
  hb_mutexSubscribe(mtx,, @xParam)
  xI := xParam


Is this code thread safe? The problem is that, if some_value is complex type "xI := NIL" in thread1 decreases reference counter, and "xI := xParam" in thread2 increases reference counter of the same some_value. These operations are not protected by any mutex.


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

Reply via email to