Sha256: 236c9e9c0be9b2fd55ea17ca4c693be201735fd488486e7a28779f48c60aa6b0
Contents?: true
Size: 663 Bytes
Versions: 83
Compression:
Stored size: 663 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/fixtures/classes' describe "Thread::list" do it "includes the current and main thread" do Thread.list.should include(Thread.current) Thread.list.should include(Thread.main) end it "does not include deceased threads" do t = Thread.new { 1; } t.join Thread.list.should_not include(t) end it "includes waiting threads" do c = Channel.new t = Thread.new { c.receive } begin Thread.list.should include(t) ensure c << nil t.join end end end
Version data entries
83 entries across 83 versions & 1 rubygems