← Graph

Freeze Or Make_Shareable Non-Sharable Objects For Ractors

takeaway 2 connections

The most common Ractor error is trying to access a non-shareable object (e.g. a plain Hash) from a non-main Ractor. Mitigations: pass the object in via Ractor#send, call .freeze on it so the Ractor knows it cannot mutate, or call Ractor.make_shareable (which accepts options like deep_freeze). Advice: while prototyping, just freeze or make_shareable.

type
recommendation
takeaway Freeze Or Make_Shareable Non-Sharable Objects For Ractors
about
Ractor concept
Takeaway on Ractor object-sharing semantics.
takeaway Freeze Or Make_Shareable Non-Sharable Objects For Ractors
from_talk
Explicit recommendation from the Ractor primer section.

Provenance