Reader-Writer lock with priority for writers in Python

I needed a reader-writer lock to use in the second readers-writers problem with python threads. In this problem, many readers can simultaneously access a share, and a writer has an exclusive access to this share. Additionally, the following constraints should be met: 1) no reader should be kept waiting if the share is currently opened for reading unless a writer is also waiting for the share, 2) no writer should be kept waiting for the share longer than absolutely necessary.

4 Responses to Reader-Writer lock with priority for writers in Python

I read a lot of interesting articles here. Probably you spend a lot of
time writing, i know how to save you a lot of time, there is an online tool that
creates high quality, SEO friendly posts in minutes, just type
in google – k2seotips unlimited content

Hi there,
Are you still maintaining the RWLock and is it on github? This is a nice implementation of RWLock but I think there might be some potential problem when several writer want to acquire the lock. I would be glad to fork the project if it’s already on github. If it’s not, do you mind I fork it on github?