mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix ractor docs (#4048) [doc]
This commit is contained in:
parent
0e015f9389
commit
8187228de0
Notes:
git
2021-01-11 05:40:02 +09:00
Merged-By: marcandre <github@marc-andre.ca>
1 changed files with 3 additions and 3 deletions
|
@ -1,13 +1,13 @@
|
|||
# Ractor is a Actor-model abstraction for Ruby that provides thread-safe parallel execution.
|
||||
#
|
||||
# Ractor.new can make new Ractor and it will run in parallel.
|
||||
# Ractor.new can make a new Ractor, and it will run in parallel.
|
||||
#
|
||||
# # The simplest ractor
|
||||
# r = Ractor.new {puts "I am in Ractor!"}
|
||||
# r.take # wait it to finish
|
||||
# r.take # wait for it to finish
|
||||
# # here "I am in Ractor!" would be printed
|
||||
#
|
||||
# Ractors do not share usual objects, so the some kind of thread-safety concerns such as data-race,
|
||||
# Ractors do not share usual objects, so the same kinds of thread-safety concerns such as data-race,
|
||||
# race-conditions are not available on multi-ractor programming.
|
||||
#
|
||||
# To achieve this, ractors severely limit object sharing between different ractors.
|
||||
|
|
Loading…
Reference in a new issue