rtyler/vagrant-plugin — pull request #21 by darthsteven (2012-08-16 22:44:16+00:00)
Title: Implement locking to prevent import errors

Hi, this is my first ever bit of ruby code, so go easy on me :)

I described in an issue against Vagrant: mitchellh/vagrant#1075 basically it's easy with the Vagrant plugin for Jenkins to import two VMs at once, which VBoxManage seemingly can't handle. Seeing as how in that issue the Vagrant maintainer says he'll get around to fixing this at some point, I've implemented a workaround in the vagrant-plugin here.

Not sure this is the best way to implement locking in JRuby, but it seems to work.