2010-03-04 205 views
3

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

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' 

宝石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是不同的,我想知道,如果创业板将在1.9工作。

+0

/我给KandadaBoggu提示帽子。 <3 – 2010-03-04 22:39:14

回答

1

这个问题不在Ruby的线程系统中,我相信它与Windows内核的计时器系统有关。

系统定时器,基于 底层SIGALRM系统计时器的计时器,是 溶液于访问 外部资源时挂起 超出时限红宝石过程。当timeout.rb依赖于绿色 线程不能一致地工作时,这是有用的 。

你最好直接问宝石的制造商他们是否支持Windows + 1.9(如果可能的话)。