Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Monitor for alternating readers-writers with dual mutex  RSS feed

 
Yuri Gadow
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wondering if anyone has implemented a reader/writer monitor with separate mutexs for reading and writing (to restrict notifies to the appropriate group and allow writers to be woken singly.)?
I'm having trouble getting around the fact that a wait only releases the lock on the wait target. Any thoughts?
 
Jim Baiter
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think Doug Lea's concurrent package has something like this, link is
http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html
 
David Weitzman
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case anyone is curious, mutex is a cool word.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!