首页 时政热点 科技头条 智能AI 安全攻防 数码硬件 开发者生态 汽车 游戏 社会热点 开源推荐 医疗健康 归档 标签 关于

Solid Queue 1.6.0 现在支持光纤工作人员

摘要

A long-awaited feature thanks to @crmne on this release: instead of using a thread pool to run jobs in multiple threads per works, you can now use fibers on a single fiber reactor thread. To use this,...

you fiber this threads fibers need the crmne instead using
2026-08-01 1 阅读 约1分钟阅读 earcar
分享:
字号:
感谢此版本中的@crmne,这是一个期待已久的功能:您现在可以在单个光纤反应器线程上使用光纤,而不是使用线程池在每个工作的多个线程中运行作业。要使用它,您只需要在工作配置中指定纤程数量而不是线程数量,如下所示:workers : -queues : " api* " Fibers : 100 polling_interval : 0.05 它在底层使用异步,因此您需要将其作为依赖项才能工作。另外,您需要在 Rails 中使用光纤隔离( config.active_support.isolation_level`` = : Fiber )。这对于 I/O 密集型工作负载(例如涉及 LLM 调用的工作负载)非常有用。更改内容 由 @crmne 在 #728 中添加光纤工作线程执行模式 回滚在测试中由 @rosa 在 #773 中被杀死的作业线程泄漏的事务 由 @wintan1418 在 #777 中记录如何更新动态重复任务 新贡献者完整变更日志:v1.5.1...v1.6.0
这篇文章对您有帮助吗?

订阅66必读

每日精选科技资讯,直达你的邮箱