什么是 ruby/rails 中的工人? [英] What is a worker in ruby/rails?
本文介绍了什么是 ruby/rails 中的工人?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我来自 Java 世界,在 ruby/rails 世界中不断听到工人"这个词.它是什么?一个线程?
I am coming from the Java world and keep hearing this term 'worker' in the ruby/rails world. What is it? a thread?
推荐答案
取决于上下文.
工作线程通常是在您的应用程序请求周期之外运行的进程.Ruby 库,如 resque 和 delayed_job通常用于管理工作队列.
A worker is typically a process that runs outside of your application request cycle. Ruby libraries like resque and delayed_job are typically used to manage worker queues.
另一方面,如果我们谈论网络服务器,worker"这个词有时会与线程或进程互换使用(即:nginx 或 apacheworkers").
On the other hand, if we're talking about web servers the word "worker" is sometimes used interchangeably with threads or processes (ie: nginx or apache "workers").
这篇关于什么是 ruby/rails 中的工人?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文