We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8f80ce0 + 0180758 commit d672746Copy full SHA for d672746
lib/concurrent/tvar.rb
@@ -112,7 +112,7 @@ def atomically
112
result = Transaction::ABORTED
113
rescue => e
114
transaction.abort
115
- throw e
+ raise e
116
end
117
# If we can commit, break out of the loop
118
spec/concurrent/tvar_spec.rb
@@ -40,6 +40,14 @@ module Concurrent
40
expect { Concurrent::atomically }.to raise_error(ArgumentError)
41
42
43
+ it 'raises the same exception that was raised in Concurrent::atomically' do
44
+ expect {
45
+ Concurrent::atomically do
46
+ raise StandardError, 'This is an error!'
47
+ end
48
+ }.to raise_error(StandardError, 'This is an error!')
49
50
+
51
it 'retries on abort' do
52
count = 0
53
0 commit comments