Created
August 3, 2008 22:51
-
-
Save skwp/3846 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ThreadFactory | |
if ENV['RAILS_ENV'] == 'development' | |
class FakeThread | |
def initialize(&block) | |
block.call | |
end | |
end | |
def initialize(&block) | |
FakeThread.new(&block) | |
end | |
else | |
def initialize(&block) | |
Thread.new(&block) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment