Ruby 1.9.3中的并行测试有多并行? [英] How parallel are parallel tests in Ruby 1.9.3?

查看:61
本文介绍了Ruby 1.9.3中的并行测试有多并行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Ruby 1.9.3中,您可以一次运行多个测试用例.我不确定这是语言的功能,最小的库还是YARV的功能,因此对任何不良术语表示歉意.

In Ruby 1.9.3, you're allowed to run multiple test cases at once. I'm not sure whether this is a feature of the language, the minitest library, or a feature of YARV, so apologies for any bad terminology.

但是他们是否为此消除了GVL,或者这是否仅意味着如果一个线程在做IO,则另一个线程可以利用CPU?

But have they eliminated the GVL for this, or does this merely mean that if one thread's doing IO, another thread can utilize the CPU?

推荐答案

该实现不使用线程,而是通过管道进行通信的单独进程.参见例如此演示文稿.因此,GVL/GIL无法发挥作用.

The implementation doesn't use threads, but separate processes communicating through pipes. See e.g. this presentation. So the GVL/GIL doesn't come into play.

这篇关于Ruby 1.9.3中的并行测试有多并行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆