Skip to content

Commit

Permalink
Update comment about ::Array on CRuby, it's not fully thread-safe
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Mar 10, 2023
1 parent c587821 commit e7ff945
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/concurrent-ruby/concurrent/array.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ module Concurrent
# @!macro internal_implementation_note
ArrayImplementation = case
when Concurrent.on_cruby?
# Array is thread-safe in practice because CRuby runs
# threads one at a time and does not do context
# switching during the execution of C functions.
# Array is not fully thread-safe on CRuby, see
# https://github.com/ruby-concurrency/concurrent-ruby/issues/929
# So we will need to add synchronization here
::Array

when Concurrent.on_jruby?
Expand Down

0 comments on commit e7ff945

Please sign in to comment.