path: root/doc
diff options
authorBenoit Daloze <>2022-01-10 13:08:59 +0100
committerBenoit Daloze <>2022-01-10 13:08:59 +0100
commitca97001a945abf93dc5fbfe99f59f28c7d91e4c8 (patch)
tree1714a6a303f8917db727c484cd614f1524ed0d2a /doc
parentb4d0d07e2c1ad21297a286601dcc9ec2ab068b69 (diff)
Make the Ractor-safe section more fluent
Diffstat (limited to 'doc')
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/extension.rdoc b/doc/extension.rdoc
index b4b34b86de..30800c2435 100644
--- a/doc/extension.rdoc
+++ b/doc/extension.rdoc
@@ -2178,10 +2178,11 @@ because g_called global variable should be synchronized by other
ractor's threads. To avoid such data-race, some synchronization should
be used. Check include/ruby/thread_native.h and include/ruby/atomic.h.
-On the Ractor mechanism, most of objects given by the method parameters
-or the receiver are isolated by Ractor's boundary, it is easy to make
-thread-safe code than usual thread-programming in general. For example,
-we don't need to lock an array object to access the element of it.
+With Ractors, all objects given as method parameters and the receiver (self)
+are guaranteed to be from the current Ractor or to be shareable. As a
+consequence, it is easier to make code ractor-safe than to make code generally
+thread-safe. For example, we don't need to lock an array object to access the
+element of it.
(3) Check the thread-safety of any used library