gpt4 book ai didi

ruby-on-rails - 在 Windows 上安装 gem system_timer

转载 作者:数据小太阳 更新时间:2023-10-29 08:10:49 24 4
gpt4 key购买 nike

这里有人成功地在 Windows 上安装了 system_timer gem 吗?我的机器上有 devkit,我可以安装其他本地 gem。安装 gem 时出现以下错误。

In file included from system_timer_native.c:2:
c:/Ruby19/include/ruby-1.9.1/ruby/backward/rubysig.h:14:2: warning:
#warning rubysig.h is obsolete
system_timer_native.c: In function `install_timer':
system_timer_native.c:28: error: storage size of 'timer_interval' isn't known
system_timer_native.c:33: warning: implicit declaration of function `sigprocmask'

gem home page声明它不适用于 Windows

SystemTimer  only works on UNIX platforms (Mac OS X, Linux, Solaris, BSD, …). 
You can install the gem on Microsoft Windows, but you will only get a
convenience shell wrapping a simple call to timeout.rb under the cover.

我在使用 Ruby 1.9,由于 1.9 中的线程模型不同,我想知道 gem 是否可以在 1.9 中工作。

最佳答案

问题不在于 Ruby 的线程系统,而在于 Windows 内核的定时器系统,我相信。

System Timer, a timer based on underlying SIGALRM system timers, is a solution to Ruby processes which hang beyond the time limit when accessing external resources. This is useful when timeout.rb, which relies on green threads, does not work consistently.

您最好直接询问 gem 的制造商他们是否在管道中支持 Windows+1.9(如果可能的话)。

关于ruby-on-rails - 在 Windows 上安装 gem system_timer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2383245/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com