GNOME Bugzilla – Bug 681980
A reader lock can be obtained even if a writer is already waiting for a lock
Last modified: 2018-05-24 14:28: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
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.
OK, so there is no way to choose a scheduling policy that prevents writer starvation?
-- 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.