Hi,
I made new kind of mutex based on upgrade_mutex. With this mutex one can ask to promote his access from shared to exclusive.
It is recursive. It has some extra enhancements: fair locking and what I called a main thread : I mean a thread to process in priority.
I didn’t implement all the functions because
·
I didn’t need them
·
I ran out of time
But if you like it feel free to add to the library.
Mention my name would be nice.
Here are all the details + source code :
http://www.codeproject.com/Articles/511541/Mutable-Promotable-Recursive-Mutex
Best regards,
Jean-Marc OLIVIERI