We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac37cf4 commit b3f76a2Copy full SHA for b3f76a2
spec/concurrent/executor/indirect_immediate_executor_spec.rb
@@ -8,5 +8,19 @@ module Concurrent
8
subject { IndirectImmediateExecutor.new }
9
10
it_should_behave_like :executor_service
11
+
12
+ it "runs its tasks synchronously" do
13
+ start = Time.now
14
+ subject.post { sleep 0.1 }
15
16
+ expect(Time.now - start).to be >= 0.1
17
+ end
18
19
+ it "runs the task on a separate thread" do
20
+ used_thread = nil
21
+ subject.post { used_thread = Thread.current }
22
23
+ expect(used_thread).not_to be(Thread.current)
24
25
end
26
0 commit comments