Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

No need to defensively work jobs in another thread

  • Loading branch information...
commit aebbd4bb4d2bb5a461d5ec70dd27e5cb832d6869 1 parent 96e713b
@jeremy jeremy authored
View
2  activesupport/lib/active_support/queueing.rb
@@ -110,7 +110,7 @@ def shutdown
end
def drain
- Thread.new { run(@queue.pop) until @queue.empty? }.join
+ run(@queue.pop) until @queue.empty?
end
def consume
View
2  activesupport/test/queueing/test_queue_test.rb
@@ -97,6 +97,6 @@ def test_drain
assert @queue.empty?
assert job.ran?, "The job runs synchronously when the queue is drained"
- assert_not_equal job.thread_id, Thread.current.object_id
+ assert_equal job.thread_id, Thread.current.object_id
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.