After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 469209 - [patch] add accessor function for threadsafety attribute
[patch] add accessor function for threadsafety attribute
Status: RESOLVED WONTFIX
Product: gdk-pixbuf
Classification: Platform
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on:
Blocks: 449409
 
 
Reported: 2007-08-22 11:39 UTC by Felix Riemann
Modified: 2013-12-19 04:33 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
add gdk_pixbuf_format_is_threadsafe() (1.72 KB, patch)
2007-08-22 11:40 UTC, Felix Riemann
reviewed Details | Review

Description Felix Riemann 2007-08-22 11:39:29 UTC
Currently the TIFF-loader and the commonly used SVG-loader (from librsvg) are marked as not threadsafe. As bug 449409 shows these loaders can produce some ugly deadlocks due to the global lock they hold when active.

To know that the loader is not threadsafe the programmer needs to access the GdkPixbufFormat structure directly, which is not the "preferred" way.

The following patch adds a simple function in the spirit of gdk_pixbuf_format_is_writable() to return if the format's loader is threadsafe.
Comment 1 Felix Riemann 2007-08-22 11:40:21 UTC
Created attachment 94099 [details] [review]
add gdk_pixbuf_format_is_threadsafe()

Adds the above mentioned function. I am not sure if I did that alias-stuff correctly.
Comment 2 Felix Riemann 2007-08-23 10:00:30 UTC
(In reply to comment #1)
> 
> ... I am not sure if I did that alias-stuff correctly.
> 
Ah, never mind looks like thats created automatically.
Comment 3 Lucas Rocha 2007-09-04 20:01:05 UTC
Matthias, is there time to add this API?
Comment 4 Matthias Clasen 2007-09-09 20:06:19 UTC
I wonder how having this accessor helps in avoiding the deadlocks.
Comment 5 Lucas Rocha 2007-09-09 21:10:24 UTC
I know that whether a pixbuf loader is thread-safe or not shouldn't matter. Therefore, at first sight, this is kind of useless addition. 

However, we've made a workaround for the deadlock problem in EOG (see bug #449409) and for doing so we're directly accessing GdkPixbufFormat struct (which is not good).

If you prefer to just fix the deadlock problem in order to not need to check this kind of property in GdkPixbufFormat, this is ok for me. :-)
Comment 6 Christian Persch 2012-01-29 18:22:35 UTC
This is useless to fix the rsvg pixbuf loader bug, since to get a GdkPixbufFormat structure you first have to create a pixbuf loader, which will already cause the deadlock.
Comment 7 Matthias Clasen 2013-12-19 04:33:46 UTC
we're now mandating that loaders must be threadsafe