Skip to content

Commit

Permalink
remove non thread-safe autoload warning when under a single thread
Browse files Browse the repository at this point in the history
  • Loading branch information
rtomayko committed Oct 16, 2009
1 parent b85ba09 commit db7777e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/tilt.rb
Expand Up @@ -133,8 +133,10 @@ def local_assignment_code(locals)
end

def require_template_library(name)
warn "WARN: loading '#{name}' library in a non thread-safe way; " +
"explicit require '#{name}' suggested."
if Thread.list.size > 1
warn "WARN: tilt autoloading '#{name}' in a non thread-safe way; " +
"explicit require '#{name}' suggested."
end
require name
end
end
Expand Down

0 comments on commit db7777e

Please sign in to comment.