⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 threads.t

📁 source of perl for linux application,
💻 T
字号:
#!/usr/bin/perl -wBEGIN {    if( $ENV{PERL_CORE} ) {        chdir 't';        @INC = '../lib';    }}use Config;BEGIN {    unless ( $] >= 5.008001 && $Config{'useithreads'} &&              eval { require threads; 'threads'->import; 1; })     {        print "1..0 # Skip: no working threads\n";        exit 0;    }}use strict;use Test::Builder;my $Test = Test::Builder->new;$Test->exported_to('main');$Test->plan(tests => 6);for(1..5) {	'threads'->create(sub {           $Test->ok(1,"Each of these should app the test number")     })->join;}$Test->is_num($Test->current_test(), 5,"Should be five");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -