Skip to content

Commit

Permalink
Tweak the code a bit, since rubinius/rubinius#1940 has been fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
thedarkone committed Oct 11, 2012
1 parent 3bc9374 commit bd2b925
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/thread_safe/atomic_reference_cache_backend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def compute_if_absent(key)
current_table = table || initialize_table
while true
if !(node = current_table.volatile_get(i = current_table.hash_to_index(hash)))
succeeded, new_value = current_table.try_to_cas_in_computed(i, hash, key) { yield }
succeeded, new_value = current_table.try_to_cas_in_computed(i, hash, key) { raise 'THIS_MIGHT_DEADLOCK' }
if succeeded
increment_size
return new_value
Expand Down

0 comments on commit bd2b925

Please sign in to comment.