blob: 5a6c0c86326a1382593e0605f6dc83d4e59c8882 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
require_relative '../../spec_helper'
ruby_version_is "3.1" do
describe "Thread#native_thread_id" do
it "returns an integer when the thread is alive" do
Thread.current.native_thread_id.should be_kind_of(Integer)
end
it "returns nil when the thread is not running" do
t = Thread.new {}
t.join
t.native_thread_id.should == nil
end
end
end
|