3 ms·
> for example it’s asynchronous Ruby also lets you build programs like this as of 3.0, using Ractor#send / Ractor::receive https://docs.ruby-lang.org/en/master
by Lammy 5y ago
> for example it’s asynchronous
Ruby also lets you build programs like this as of 3.0, using Ractor#send / Ractor::receive https://docs.ruby-lang.org/en/master/doc/ractor_md.html#label-Communication+between+Ractors https://docs.ruby-lang.org/en/master/doc/ractor_md.html#labe...
It’s still pretty new so a lot of the Gem ecosystem hasn’t caught up yet (e.g. C extensions need to be explicitly opted-in as Ractor-safe), but I built a new “MIME::Types” library replacement with it recently and have enjoyed very few teething issues: https://github.com/okeeblow/DistorteD/blob/NEW%E2%80%85SENSATION/CHECKING%20YOU%20OUT/lib/checking-you-out/ghost_revival.rb#L363 https://github.com/okeeblow/DistorteD/blob/NEW%E2%80%85SENSA...