Closed stakach closed 10 years ago
I'm not as familiar with the Ruby runtime, but in Python there is a finite cost to releasing and reacquiring the GIL. Originally, pyzmq released the GIL on every libzmq API call, but now it only does this on actual blocking methods (send, recv, close, term, etc.), because it turns out that it performs better when you don't release the GIL unnecessarily.
Might be worth benchmarking. My primary use is with Rubinius and the changes here can't be too detrimental as most functions were marked as blocking already. This was really just for readability
Makes sense - I'm fine with this change as-is, I just thought I would bring up my experience from pyzmq since it seemed relevant to the code being touched. Benchmarking can be another project.
Since this is really a style change, I will defer to @chuckremes for merge.
I think the style change is fine. That syntax didn't exist when I first wrote the code so I'm happy to move to a more compact use. Thanks for the work!
Might as well release the GIL on libc too.