Question about deprecated Gdk thread lock functions
- From: Nicolas Soubeiran <nicolas soubeiran gmail com>
- To: gtk-devel-list gnome org
- Subject: Question about deprecated Gdk thread lock functions
- Date: Thu, 23 Aug 2012 16:42:28 +0200
I have a question on how I can upgrade my code (Gtk+ v.2.18) that uses
the deprecated GDK_THREAD_ENTER/LEAVE API.
In my case I compute pixbuf in separated threads and I have to lock
the GdkPixbuf creation:
/* thread function */
void _compute_pixbuf ( ...)
{
gchar* pixels;
GdkPixbuf *pixbuf;
/* actual pixel computation */
...
/* when ok build the pixbuf (critical section )*/
GDK_THREAD_ENTER()
pixbuf = gdk_pixbuf_new_from_data(pixels...);
GDK_THREAD_LEAVE();
/* post computation */
}
If I remove the GDK_THREAD_ENTER/LEAVE pair, my program aborts (memory
fault) in the gdk_pixbuf_new_from_data function.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]