Busy task no longer runs in a separate thread.

This commit is contained in:
Mitchell Hashimoto 2010-04-24 03:26:44 -07:00
parent f249896ce1
commit 4394882a7b
3 changed files with 2 additions and 12 deletions

View File

@ -28,8 +28,7 @@ module Vagrant
begin
Signal.trap("INT") { wait_for_not_busy }
Busy.busy = true
runner = Thread.new(block) { block.call }
runner.join
block.call
ensure
# In the case an exception is thrown, make sure we restore
# busy back to some sane state.

View File

@ -73,15 +73,6 @@ class BusyTest < Test::Unit::TestCase
assert Vagrant.busy?
end
should "run the action in a new thread" do
runner_thread = nil
Vagrant.busy do
runner_thread = Thread.current
end
assert_not_equal Thread.current, runner_thread
end
should "trap INT" do
trap_seq = sequence("trap_seq")
Signal.expects(:trap).with("INT", anything).once.in_sequence(trap_seq)

View File

@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
s.authors = ["Mitchell Hashimoto", "John Bender"]
s.date = %q{2010-04-23}
s.date = %q{2010-04-24}
s.default_executable = %q{vagrant}
s.description = %q{Vagrant is a tool for building and distributing virtualized development environments.}
s.email = ["mitchell.hashimoto@gmail.com", "john.m.bender@gmail.com"]