ruby-numo / numo-narray

Ruby/Numo::NArray - New NArray class library
http://ruby-numo.github.io/narray/
BSD 3-Clause "New" or "Revised" License
413 stars 41 forks source link

Ractor compatibility #203

Open orlando-labs opened 2 years ago

orlando-labs commented 2 years ago

Hi. First of all, thanks for Numo.

I propose to make numo ractor-safe in order to use it with ruby 3 ractors by calling rb_ractor_safe(true) in the C-code. Otherwise it is not possible to parallelise computational-expensive applications using Numo within newly introduced ractors.

Thanks

kojix2 commented 2 years ago

If you could review this, it would be a contribution... https://github.com/ruby-numo/numo-narray/pull/199

orlando-labs commented 2 years ago

Thanks! I will try it with my current project and get back with the feedback, ok?

orlando-labs commented 2 years ago

https://github.com/ruby-numo/numo-narray/pull/199#issuecomment-1027988803