summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLars Kanis <lars@greiz-reinsdorf.de>2021-03-05 10:59:47 +0100
committerLars Kanis <lars@greiz-reinsdorf.de>2021-03-05 11:02:58 +0100
commit334c3afbd30df768974b9a228847fda027643c7d (patch)
tree4641700d719c3148fc71d8d8d3fc265031797fd3 /spec
parent1cce06db0b774ee46ef98ea9ca6ceec5d21694a4 (diff)
downloadffi-334c3afbd30df768974b9a228847fda027643c7d.tar.gz
Use shorter thread names for FFI's callbacks
The thread name is truncated in gdb to 15 characters, so that there was no distiction between "Callback Runner" and "Callback Dispatcher".
Diffstat (limited to 'spec')
-rw-r--r--spec/ffi/async_callback_spec.rb2
-rw-r--r--spec/ffi/function_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/ffi/async_callback_spec.rb b/spec/ffi/async_callback_spec.rb
index d770355..51a4886 100644
--- a/spec/ffi/async_callback_spec.rb
+++ b/spec/ffi/async_callback_spec.rb
@@ -48,6 +48,6 @@ describe "async callback" do
LibTest.testAsyncCallback(proc { callback_runner_thread = Thread.current }, 0)
- expect(callback_runner_thread.name).to eq("FFI::Function Callback Runner")
+ expect(callback_runner_thread.name).to eq("FFI Callback Runner")
end
end
diff --git a/spec/ffi/function_spec.rb b/spec/ffi/function_spec.rb
index a7d6dc7..5bc2421 100644
--- a/spec/ffi/function_spec.rb
+++ b/spec/ffi/function_spec.rb
@@ -26,7 +26,7 @@ describe FFI::Function do
skip 'this is MRI-specific' if RUBY_ENGINE == 'truffleruby' || RUBY_ENGINE == 'jruby'
FFI::Function.new(:int, []) { 5 } # Trigger initialization
- expect(Thread.list.map(&:name)).to include('FFI::Function Callback Dispatcher')
+ expect(Thread.list.map(&:name)).to include('FFI Callback Dispatcher')
end
end