Re: [Vala] vala friendly atomic pointer

2013-12-22 Thread Nor Jaidi Tuah
Not the simplest solution, but works well. After thinking more about my problem, I don't think any reliable efficient solution is going to be simple. Thanks for the input. Nice day Nor Jaidi Tuah PRIVILEGED/CONFIDENTIAL information may be contained in this message. If you are neither

Re: [Vala] vala friendly atomic pointer

2013-12-20 Thread Maciej Piechotka
currently using global lock in GObject[2]. From: norjaidi.t...@ubd.edu.bn To: vala-list@gnome.org Date: Thu, 19 Dec 2013 08:59:44 +0800 Subject: [Vala] vala friendly atomic pointer Dear all, I want to implement something like these: * x = AtomicPointer.@get (ref atomicRef

Re: [Vala] vala friendly atomic pointer

2013-12-20 Thread Nor Jaidi Tuah
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

Re: [Vala] vala friendly atomic pointer

2013-12-20 Thread Maciej Piechotka
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

Re: [Vala] vala friendly atomic pointer

2013-12-20 Thread Maciej Piechotka
On Sat, 2013-12-21 at 07:08 +0100, Maciej Piechotka wrote: 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

Re: [Vala] vala friendly atomic pointer

2013-12-20 Thread Nor Jaidi Tuah
Thank you for the clarification and the link on HazardPointer. Nice day Nor Jaidi Tuah PRIVILEGED/CONFIDENTIAL information may be contained in this message. If you are neither the addressee (intended recipient) nor an authorised recipient of the addressee, and have received this message

Re: [Vala] vala friendly atomic pointer

2013-12-19 Thread Tal Hadad
http://www.valadoc.org/#!api=gobject-2.0/GLib.WeakRef This is a simple solution thanks to the good design of GObject. Tal From: norjaidi.t...@ubd.edu.bn To: vala-list@gnome.org Date: Thu, 19 Dec 2013 08:59:44 +0800 Subject: [Vala] vala friendly atomic pointer Dear all, I want