File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,9 @@ module Concurrent
2121 # @!macro internal_implementation_note
2222 ArrayImplementation = case
2323 when Concurrent . on_cruby?
24- # Because MRI never runs code in parallel, the existing
25- # non-thread-safe structures should usually work fine.
24+ # Array is thread-safe in practice because CRuby runs
25+ # threads one at a time and does not do context
26+ # switching during the execution of C functions.
2627 ::Array
2728
2829 when Concurrent . on_jruby?
@@ -63,4 +64,3 @@ class Array < ArrayImplementation
6364 end
6465
6566end
66-
Original file line number Diff line number Diff line change @@ -15,8 +15,9 @@ module Concurrent
1515 # @!macro internal_implementation_note
1616 HashImplementation = case
1717 when Concurrent . on_cruby?
18- # Because MRI never runs code in parallel, the existing
19- # non-thread-safe structures should usually work fine.
18+ # Hash is thread-safe in practice because CRuby runs
19+ # threads one at a time and does not do context
20+ # switching during the execution of C functions.
2021 ::Hash
2122
2223 when Concurrent . on_jruby?
@@ -56,4 +57,3 @@ class Hash < HashImplementation
5657 end
5758
5859end
59-
You can’t perform that action at this time.
0 commit comments