Permalink
Browse files

set thread priority using options[:nice] value

  • Loading branch information...
1 parent 8389758 commit d18b8211b1d648c8eb5b66ab3e7d277761eb2e9d @tra committed Jun 14, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/spawn.rb
View
1 lib/spawn.rb
@@ -204,6 +204,7 @@ def thread_it(options)
# run the long-running code block
yield
end
+ thr.priority = -options[:nice] if options[:nice]
return SpawnId.new(:thread, thr)
end

0 comments on commit d18b821

Please sign in to comment.