-
-
Notifications
You must be signed in to change notification settings - Fork 921
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use thread-local state for all recursive checks.
- Loading branch information
Showing
2 changed files
with
21 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,11 @@ | |||
require 'rspec' | |||
|
|||
describe 'Joining an array that contains arrays' do | |||
it 'should work across multiple threads without error' do | |||
a = [(1..100).to_a] | |||
lambda do | |||
result = (1..100).map { Thread.new { 10.times { a.join }; :ok } }.map(&:value) | |||
result.should == [:ok] * 100 | |||
end.should_not raise_exception | |||
end | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters