atomic exitread/enterwrite : allows to keep monitor in between exit read and next enter write . use when writing changes is optional , otherwise call the individual methods . returns false if multiple readers are accessing the index . concode_field_sep int status concode_field_sep void enterWrite concode_elem_sep void enterRead concode_elem_sep void exitWriteEnterRead concode_elem_sep String toString concode_elem_sep void exitRead concode_elem_sep void exitWrite
boolean function ( ) { if ( status != 1 ) return false ; status = - 1 ; return true ; }