-
-
Save v0dro/d465589fba704178297592c78fba5a85 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In a calling Ruby script caller.rb | |
require ‘compiled_binary.so’ | |
def compute_without_gil | |
t = [] | |
4.times { t << Thread.new { _some_computation } | |
4.times { t.join } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment