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 681980 - A reader lock can be obtained even if a writer is already waiting for a lock
A reader lock can be obtained even if a writer is already waiting for a lock
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gthread
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-08-16 10:16 UTC by Yann Soubeyrand
Modified: 2018-05-24 14:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case (1.41 KB, text/plain)
2012-08-16 10:16 UTC, Yann Soubeyrand
Details

Description Yann Soubeyrand 2012-08-16 10:16:06 UTC
Created attachment 221356 [details]
Test case

Hi,

In the doc it is stated that a read lock can't be obtained when a writer is waiting for a lock but that's not the case. A test case is attached.

Cheers
Comment 1 Matthias Clasen 2012-08-16 21:11:01 UTC
Looks like our docs are simply wrong here. 

http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_rwlock_rdlock.html

seems to say that it is basically implementation-defined whether read locks can still be obtained when a writer is blocked.
Comment 2 Yann Soubeyrand 2012-08-17 09:00:49 UTC
OK, so there is no way to choose a scheduling policy that prevents writer starvation?
Comment 3 GNOME Infrastructure Team 2018-05-24 14:28:06 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/590.