Ruby creator floats new concurrency model

Ruby creator floats new concurrency model

Developers using the open source Ruby dynamic language are in for some big changes. The language is set to feature a new concurrency and parallelism model, called Guild, in the Ruby 3 upgrade tentatively slated to arrive before 2020.

Plans detailed at a technical conference in Kyoto, Japan this week cite intentions to equip Ruby for a programming landscape that increasingly has moved to multi-core processing. Currently, Ruby supports concurrency via threads, but making thread-safe programs is hard because of a need to manage object mutations. Guild overcomes this issue via a concurrency model enabling parallel execution.

"Since threads provide no data protection, it is very difficult to write correct programs," Ruby founder Yukihiro Matsumoto said. "Guilds are isolated [from] each other and do not share mutable states, basically like an actor model that many other languages have." Ruby needs a new concurrency model because it already has a thread model that cannot be removed, as it maintains compatibility in the language, Matsumoto said.

The conference presentation from Heroku's Koichi Sasada, a Ruby core committer, maps out intentions for Guild, described as a "new concurrency abstraction." Each Guild has at least one thread; threads in different Guilds can run in parallel, but threads in the same guild can't because of a Giant Guild Lock capability. Mutable objects should belong to one Guild, but there can be communication between Guilds.

Multi-threaded programming is difficult, with risks including race conditions among threads, Sasada noted. There can be trade-offs in performance versus safety, it's difficult to tune performance, mutable objects must be shared correctly, and debugging is difficult.

"Guild is part of our Ruby 3 experiment," Matsumoto said, but he also noted that the name, Guild, as well as its behavior could be changed by the time it arrives.

IDG Insider


«Tested: This all-AMD $650 PC proves VR-ready rigs don't have to be expensive


US lawmakers make last-ditch bid to block internet governance transfer»
IDG Connect

IDG Connect tackles the tech stories that matter to you

Most Recent Comments

Our Case Studies

IDG Connect delivers full creative solutions to meet all your demand generatlon needs. These cover the full scope of options, from customized content and lead delivery through to fully integrated campaigns.


Our Marketing Research

Our in-house analyst and editorial team create a range of insights for the global marketing community. These look at IT buying preferences, the latest soclal media trends and other zeitgeist topics.



Should the government regulate Artificial Intelligence?