Re: [Vala] "vala friendly" atomic pointer



On Sat, 2013-12-21 at 11:41 +0800, Nor Jaidi Tuah wrote:
Thanks for the replies.

It seems that WeakRef doesn't help with the granularity:
multiple readers will lock out each other (I hope I'm
wrong here). Besides, from
https://bugzilla.gnome.org/show_bug.cgi?id=703996
it appears that WeakRef is totally broken.

As for HazardPointers, according to the documentation:
     HazardPointers are not thread-safe (unless documentation
     states otherwise)

I wish vala has "lockread" in addition to lock.


(I've wrote both the HazardPointers and documentations to them)

HazardPointers as structure are not thread safe - i.e. you cannot access
single HazardPointer from multiple threads. However they do allow
multi-thread access (that's their purpose).

Best regards

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]