trilogy-libraries / trilogy

Trilogy is a client library for MySQL-compatible database servers, designed for performance, flexibility, and ease of embedding.
MIT License
690 stars 66 forks source link

Make C-extension Ractor-safe #192

Open mohamedhafez opened 2 weeks ago

mohamedhafez commented 2 weeks ago

In planning ahead to the near future when TruffleRuby can run C-extensions marked with rb_ext_ractor_safe(true) in parallel, and for when Ractors are no longer just experimental, it would be great if the C-extension could be made Ractor-safe, or marked as such if it already is so!

mohamedhafez commented 1 week ago

From what I hear, @nirvdrum has been running an app using this gem at Shopify on TruffleRuby without the C-extension lock, meaning its getting run concurrently in multiple threads, and hasn't had issues, so I'm hoping there isn't much work to be done for this, and it just needs to be marked with rb_ext_ractor_safe(true)