Menu
Ruby 3 previews parallel execution

Ruby 3 previews parallel execution

Major Ruby update introduces an experimental feature called Ractor that promises thread-safe parallel execution

Credit: Aleksey Nemiro

Ruby 3.0.0, a planned upgrade to the long-established open source dynamic language, is now available as a preview. Highlights of the new version include parallel execution and type description capabilities.

Parallel execution comes in the form of an experimental feature dubbed “Ractor,” which is an Actor-model-like concurrency abstraction intended to provide parallel execution without thread safety concerns. Developers can make multiple ractors and run them in parallel. These parallel programs can be made thread safe because ractors cannot share normal objects. Communication between ractors is supported by message-passing.

Ruby 3.0.0 also introduces RBS, billed as a language to describe the types of Ruby programs. Ruby 3.0.0 ships with the rbs gem, which allows parsing and processing type definitions written in RBS. Type checkers including type profilers and other tools supporting RBS will understand Ruby programs better with RBS definitions.

RBS is intended to support commonly seen patterns in Ruby programs. Advanced types can be written including union types, method overloading, and generics. Duck typing with interface types also is supported. 

Aside from Ractor and RBS, the Ruby 3.0.0 release is slated to offer a host of other capabilities:

  • A scheduler, also in the experimental stage, for intercepting blocking operations. Identified as Thread#scheduler, the capability allows for lightweight concurrency without changing existing code.
  • Memory view, another experimental feature, is a C-API set to exchange a raw memory area, such as a numeric array or a bitmap image, between extension libraries. These libraries also can share the metadata of the memory area that consists of the shape, the element form, etc.
  • Improved performance in the Ruby MJIT (Method-based Just In Time) compiler.
  • Separation of keyword arguments from other arguments.
  • Hash#except built in.
  • A rightward assignment statement.
  • An endless method definition.
  • The addition of find pattern.

Unveiled September 25, the Ruby 3.0.0 preview is downloadable from ruby-lang.org. For the second preview, Ruby’s builders plan to include a type profiler, which serves as a static analysis feature. The current stable releases of Ruby are versions 2.7.1 and 2.6.6.


Follow Us

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Featured

Slideshows

Channel gathers to celebrate the Reseller News Innovation Awards 2020 winners

Channel gathers to celebrate the Reseller News Innovation Awards 2020 winners

More than 500 channel leaders gathered in Auckland on 21 October at the ​Reseller News Innovation Awards ​2020 to celebrate the achievements of the New Zealand technology industry's top partners, start-ups, vendors, distributors and individuals.

Channel gathers to celebrate the Reseller News Innovation Awards 2020 winners
Meet the winners of the 2020 Reseller News Innovation Awards

Meet the winners of the 2020 Reseller News Innovation Awards

Reseller News honoured the standout players of the New Zealand channel in front of more than 500 technology leaders in Auckland on 21 October, recognising the achievements of top partners, start-ups, vendors, distributors and individuals.

Meet the winners of the 2020 Reseller News Innovation Awards
Meet the Reseller News 30 Under 30 Tech Awards 2020 winners

Meet the Reseller News 30 Under 30 Tech Awards 2020 winners

This year’s Reseller News 30 Under 30 Tech Awards were held as an integral part of the first entirely virtual Emerging Leaders​ forum, an annual event dedicated to identifying, educating and showcasing the New Zealand technology market’s rising stars. The 30 Under 30 Tech Awards 2020 recognised the outstanding achievements and business excellence of 30 talented individuals​, across both young leaders and those just starting out. In this slideshow, Reseller News honours this year's winners and captures their thoughts about how their ideas of leadership have changed over time.​

Meet the Reseller News 30 Under 30 Tech Awards 2020 winners
Show Comments