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.
1 parent 7d58ec8 commit c587821Copy full SHA for c587821
lib/concurrent-ruby/concurrent/hash.rb
@@ -15,9 +15,11 @@ module Concurrent
15
# @!macro internal_implementation_note
16
HashImplementation = case
17
when Concurrent.on_cruby?
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.
+ # Hash is not fully thread-safe on CRuby, see
+ # https://bugs.ruby-lang.org/issues/19237
+ # https://github.com/ruby/ruby/commit/ffd52412ab
21
+ # https://github.com/ruby-concurrency/concurrent-ruby/issues/929
22
+ # So we will need to add synchronization here (similar to Concurrent::Map).
23
::Hash
24
25
when Concurrent.on_jruby?
0 commit comments