我已经实现了一个控制器方法,它向第三个招架 API 发出几个请求,这很慢。此外,我还利用了Thin的异步功能之一:
# This informs thin that the request will be handled asynchronously
self.response_body = ''
self.status = -1
Thread.new do
# This will be the response to the client
env['async.callback'].call('200', {}, "Response body")
end
但是我很好奇这是否可以在不使用 Thin 的情况下实现,或者更准确地说,是否可以使用 Apache/Phusionpassenger 来实现。
任何建议、指针、链接、评论或答案都将受到赞赏。谢谢