Add boolean var to avoid another Mutex#lock-related race.
Add boolean var to avoid another Mutex#lock-related race.

Same reasons as for other recent fixes; lock can appear to be
sleeping before having locked on parallel-threaded impls. Added a
boolean var to ensure we are inside the synchronize block.

eregon/rubyspec,sgarciac/spec,eregon/rubyspec,nobu/rubyspec,iliabylich/rubyspec,ruby/rubyspec,josedonizetti/rubyspec,iainbeeston/rubyspec,askl56/rubyspec,wied03/rubyspec,DavidEGrayson/rubyspec,chesterbr/rubyspec,ruby/spec,bl4ckdu5t/rubyspec,saturnflyer/rubyspec,kidaa/rubyspec,scooter-dangle/rubyspec,bl4ckdu5t/rubyspec,ericmeyer/rubyspec,yous/rubyspec,chesterbr/rubyspec,eregon/rubyspec,iliabylich/rubyspec,DawidJanczak/rubyspec,yaauie/rubyspec,mbj/rubyspec,saturnflyer/rubyspec,askl56/rubyspec,benlovell/rubyspec,BanzaiMan/rubyspec,atambo/rubyspec,yaauie/rubyspec,agrimm/rubyspec,agrimm/rubyspec,bomatson/rubyspec,wied03/rubyspec,sgarciac/spec,nobu/rubyspec,alexch/rubyspec,yous/rubyspec,nobu/rubyspec,iainbeeston/rubyspec,kachick/rubyspec,alexch/rubyspec,kachick/rubyspec,scooter-dangle/rubyspec,josedonizetti/rubyspec,teleological/rubyspec,kidaa/rubyspec,jannishuebl/rubyspec,Aesthetikx/rubyspec,sferik/rubyspec,sferik/rubyspec,DawidJanczak/rubyspec,ruby/rubyspec,ruby/spec,teleological/rubyspec,lucaspinto/rubyspec,jannishuebl/rubyspec,benlovell/rubyspec,DavidEGrayson/rubyspec,lucaspinto/rubyspec,mbj/rubyspec,wied03/rubyspec,sgarciac/spec,atambo/rubyspec,ruby/spec,BanzaiMan/rubyspec,ericmeyer/rubyspec,kachick/rubyspec,Aesthetikx/rubyspec,bomatson/rubyspec