]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commit
Mark ruby bindings as ractor safe (#1283) master
authorRein Fernhout <me@levitati.ng>
Fri, 4 Apr 2025 06:21:49 +0000 (08:21 +0200)
committerGitHub <noreply@github.com>
Fri, 4 Apr 2025 06:21:49 +0000 (08:21 +0200)
commitfe0db9ab17fcaae068236e325f7475fe9159eca2
tree25ed8b17fea285ce39fe7faed7e828b4747a0e81
parentc04171db072f7fdda6cf98f9bdf50420cc75e61f
Mark ruby bindings as ractor safe (#1283)

Ruby has a new method for concurrency called Ractors.

For C bindings to be used inside a Ractor they need to be marked
Ractor-safe [1]:
  If an extension desires to be marked as Ractor-safe the extension
  should call rb_ext_ractor_safe(true) at the Init_ function for the
  extension, and all defined methods will be marked as Ractor-safe.

By marking them Ractor-safe ruby programs can generate graphs concurrently.

See also ruby/ruby#3824 for more information concerning this method.

[1] https://docs.ruby-lang.org/en/master/extension_rdoc.html#label-Appendix+F.+Ractor+support
CHANGES
bindings/ruby/extconf.rb
bindings/ruby/main.c