Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GC sig_suspend, sig_resume for gc_none #15349

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/crystal/system/unix/pthread.cr
Original file line number Diff line number Diff line change
@@ -269,16 +269,16 @@ module Crystal::System::Thread
{% end %}

def self.sig_suspend : ::Signal
if GC.responds_to?(:sig_suspend)
GC.sig_suspend
if (gc = GC).responds_to?(:sig_suspend)
gc.sig_suspend
else
::Signal.new(SIG_SUSPEND)
end
end

def self.sig_resume : ::Signal
if GC.responds_to?(:sig_resume)
GC.sig_resume
if (gc = GC).responds_to?(:sig_resume)
gc.sig_resume
else
::Signal.new(SIG_RESUME)
end