From 4394882a7b95b9e055587d6417e491871a57dafa Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 24 Apr 2010 03:26:44 -0700 Subject: [PATCH] Busy task no longer runs in a separate thread. --- lib/vagrant/busy.rb | 3 +-- test/vagrant/busy_test.rb | 9 --------- vagrant.gemspec | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/lib/vagrant/busy.rb b/lib/vagrant/busy.rb index 74b6dc174..47cecb031 100644 --- a/lib/vagrant/busy.rb +++ b/lib/vagrant/busy.rb @@ -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. diff --git a/test/vagrant/busy_test.rb b/test/vagrant/busy_test.rb index 69516476d..2c2f31c42 100644 --- a/test/vagrant/busy_test.rb +++ b/test/vagrant/busy_test.rb @@ -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) diff --git a/vagrant.gemspec b/vagrant.gemspec index 448c7c927..8988b3cb8 100644 --- a/vagrant.gemspec +++ b/vagrant.gemspec @@ -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"]