Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/multithreading/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Multithreading perl赢得';t找到Thread::Semaphore的down_force方法?_Multithreading_Perl_Semaphore - Fatal编程技术网

Multithreading perl赢得';t找到Thread::Semaphore的down_force方法?

Multithreading perl赢得';t找到Thread::Semaphore的down_force方法?,multithreading,perl,semaphore,Multithreading,Perl,Semaphore,我验证了该软件包是使用perldoc-l Thread::Semaphore安装的,但仍然出现以下错误: 无法通过 我的代码: : #use perl eval 'exec perl -S $0 ${1+"$@"}' if 0; use threads; use threads::shared; use Thread::Semaphore; my $s = Thread::Semaphore->new(); $s->down_force(); #it comp

我验证了该软件包是使用perldoc-l Thread::Semaphore安装的,但仍然出现以下错误:
无法通过

我的代码:

: #use perl
   eval 'exec perl -S $0 ${1+"$@"}'
   if 0;

use threads;
use threads::shared;
use Thread::Semaphore;

my $s = Thread::Semaphore->new();

$s->down_force();    #it complains about this one

#some code here...

您可能有,它没有
down\u force()
方法。尝试升级到,当前为2.12。

如果您使用的是cpan,则可以使用:>sudo cpan>upgrade Thread::Semaphore