= private = protected
mon_try_enter()
Attempts to enter exclusive section. Returns false if lock fails.
# File lib/monitor.rb, line 193 def mon_try_enter result = false Thread.critical = true if @mon_owner.nil? @mon_owner = Thread.current end if @mon_owner == Thread.current @mon_count += 1 result = true end Thread.critical = false return result end