Ian Jones Logo

Ractor

Notes from Koichi Sasada Ruby Conf 2020 Talk

Ruby doesn't want to send people to threading hell... non-deterministic bugs when multiple threads are involved.

Introduce easy and parallel concurrent abstraction.

Enter Ractor. Limited object sharing between ractors.

You can declare a shared frozen object:

Ractor.make_sharable(obj)

Push type communication

Ractor.receive is an infinite queue.

Send an object from one Ractor to another

https://share.getcloudapp.com/NQuKLBwA

parallel pipeline in ractors:

https://share.getcloudapp.com/Z4uqb2Gy

Worker pools in Ractors:

https://share.getcloudapp.com/YEuQqJYx

error propogation:

https://share.getcloudapp.com/z8u4DBeR