From 649d8173c31ab0b74ef359e692eadf46b5da911d Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Tue, 21 Jul 2015 08:50:50 +0930 Subject: Order of execution is only guaranteed if upgrading If the thread isn't yet holding any form of lock, it has no claim over what may / may not run while it's blocked. --- activesupport/lib/active_support/concurrency/share_lock.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/concurrency') diff --git a/activesupport/lib/active_support/concurrency/share_lock.rb b/activesupport/lib/active_support/concurrency/share_lock.rb index 35193ea9f7..48edcfdaa5 100644 --- a/activesupport/lib/active_support/concurrency/share_lock.rb +++ b/activesupport/lib/active_support/concurrency/share_lock.rb @@ -52,7 +52,7 @@ module ActiveSupport return false if no_wait loose_shares = @sharing.delete(Thread.current) - @waiting[Thread.current] = compatible + @waiting[Thread.current] = compatible if loose_shares @cv.wait_while { busy?(purpose) } -- cgit v1.2.3