Skip to content

Commit

Permalink
Add nice warning message that gem doesn't work on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ivoanjo committed Mar 27, 2024
1 parent 4ffa17f commit c56286f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ext/gvl_tracing_native_extension/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
"Perhaps a #{RUBY_ENGINE} equivalent could be created -- help is welcome! :)\n#{"-" * 80}"
end

if Gem.win_platform?
raise \
"\n#{"-" * 80}\nSorry! This gem is currently unsupported on Microsoft Windows. That's because Ruby's GVL " \
"instrumentation API, which it relies on, also doesn't work on Windows.\n" \
"Hint: This gem does work on WSL."
end

require "mkmf"

have_func("gettid", "unistd.h")
Expand Down

0 comments on commit c56286f

Please sign in to comment.