How to write a Class(gobject) in a thread safe way?

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

 



/* I wrote a class to encapsulate a GString as a buffer. * I want to make it both thread safe and efficient.  I need several buffers * like this, so I don't want a global mutex to lock every instance of my buffer * class.  So I add a mutex as private member. * * But when I need to free my object (in maman_bar_finalize), how can I free * this mutex and the GString safely?  It might be locked at the same moment. * * The code below skimmed many detail.  But I think it could demonstrate my * problem. Thanks a lot! */
I pasted the code to pastetbin : http://pastebin.com/m56f7b37c
--look to the things around you,the immediate world around you, if youare alive,it will mean something to you ——Paul Strand_______________________________________________gtk-list mailing listgtk-list@xxxxxxxxxxxxx://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux