我在rails中使用net/http从URL获取响应代码,代码如下: require "net/http"
require "uri"
class Status
def initialize(url)
@url = url
end
def get_status
begin
response.code
rescue Exception =>
我读过this post about how inherently unsafe ruby's timeout method is,但我看起来JRuby本来就实现了Timeout类,我想知道这些问题在JRuby 1.7中是否仍然相关?从我可以从the source中得知,看起来好像有一个可重用的线程池正在使用,因此应该为每次使用启动一个新线程时遇到很多性能问题,但是我想知道安全问题,特别是因为它在