MantisBT - JANA
View Issue Details
0000164JANAFeature Requestpublic2011-11-10 15:562012-03-26 14:29
davidl 
davidl 
normalminorhave not tried
resolvedfixed 
0000164: Add either ROOT mutex or generic mutex's to JApplication
Plugins that wish to use ROOT need to have a central mutex that all of them can access to lock access to the ROOT global. Either a ROOT mutex should be added to JApplication, or a mechanism introduced that would allow any number of mutex's to be added to the JApplication so they could be accessed by multiple plugins/libraries etc.
No tags attached.
Issue History
2011-11-10 15:56davidlNew Issue
2012-03-26 14:29davidlNote Added: 0000319
2012-03-26 14:29davidlStatusnew => resolved
2012-03-26 14:29davidlResolutionopen => fixed
2012-03-26 14:29davidlAssigned To => davidl

Notes
(0000319)
davidl   
2012-03-26 14:29   
This was committed in revision 928 and will appear in JANA 0.6.4. It was implemented by adding a map of rw locks to JApplication that can be added to by the user. The user can lock and unlock the rw_lock by name.

A special lock named "root" is added automatically with special methods for locking it. The RootReadLock, RootWriteLock, and RootUnLock methods are just more obvious what they are for and are slightly more efficient since one doesn't need to access the map nor lock the special rw_locks lock in order to access it.