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
21
21
# @!macro internal_implementation_note
22
22
ArrayImplementation = case
23
23
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.
26
27
::Array
27
28
28
29
when Concurrent . on_jruby?
@@ -63,4 +64,3 @@ class Array < ArrayImplementation
63
64
end
64
65
65
66
end
66
-
Original file line number Diff line number Diff line change @@ -15,8 +15,9 @@ module Concurrent
15
15
# @!macro internal_implementation_note
16
16
HashImplementation = case
17
17
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.
20
21
::Hash
21
22
22
23
when Concurrent . on_jruby?
@@ -56,4 +57,3 @@ class Hash < HashImplementation
56
57
end
57
58
58
59
end
59
-
You can’t perform that action at this time.
0 commit comments