Dear All,
I'd like to ask help in the following, every help is appreciated.
I'd like to access gems from within a Ractor thread (Ruby v3.0.2) but it says that it's a non-shareable object. I see why that may be so but I need gems so I need to solve this. My code looks like this:
require "distribution"
r = Ractor.new {
v = receive
Distribution::Normal.cdf(v)
}
r.send( rand )
p r.take
That throws an error for the 4th line: "defined in a different Ractor (RuntimeError)"
Thanks.
Horv