You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I've seen in past issues that possibly allowing the GVL to be unlocked for rust functions would be something that magnus may do in the future. I've recently prototyped a way to do so in https://github.com/Maaarcocr/lucchetto
I was wondering if there would be any interest in mainlining that approach here, as I think it can be pretty useful to be able to decide if you want to hold the gvl lock or not.
I know that there are some safety concerns around unlocking the GVL and for that I made a small marker trait which is implemented for types that I deem to be safe to be passed in/out of functions that do not hold the GVL. Now this does not entirely disallow calling into ruby, but it's a nice first step.
For now it only works for free functions, as they are easier to make safe.
Anyway, I would be happy to scratch that repo and port the code here if there is interest! I think it works nicely.
I also recognise that the code is very young and it makes use of unsafe quite a bit, but I'm sure with some additional time spent on it we could make sure it's all good.
The text was updated successfully, but these errors were encountered:
Hi! I've seen in past issues that possibly allowing the GVL to be unlocked for rust functions would be something that magnus may do in the future. I've recently prototyped a way to do so in https://github.com/Maaarcocr/lucchetto
I was wondering if there would be any interest in mainlining that approach here, as I think it can be pretty useful to be able to decide if you want to hold the gvl lock or not.
I know that there are some safety concerns around unlocking the GVL and for that I made a small marker trait which is implemented for types that I deem to be safe to be passed in/out of functions that do not hold the GVL. Now this does not entirely disallow calling into ruby, but it's a nice first step.
For now it only works for free functions, as they are easier to make safe.
Anyway, I would be happy to scratch that repo and port the code here if there is interest! I think it works nicely.
I also recognise that the code is very young and it makes use of unsafe quite a bit, but I'm sure with some additional time spent on it we could make sure it's all good.
The text was updated successfully, but these errors were encountered: