cups_book的ChinaUnix博客
cups_book
全部博文(3)
2010年(3)
宝贝不哭
py
佟儿
兰花仙子
云儿飘飘
宝尔伊
flb_2001
swiser
瞌睡猫猫
jason680
87698136
zhuochon
kernel69
TrishaTi
zhlong8
wsxedcer
dqw233
分类:
2010-08-23 15:09:16
上一篇:今天天气还好
下一篇:perl, rand
cups_book2010-08-25 08:50:37
http://www.ibm.com/developerworks/cn/linux/l-cn-perl-thread/index.html
cups_book2010-08-23 16:15:59
my $size = $thr->get_stack_size(); print $size;
cups_book2010-08-23 16:09:27
异步线程,失败: my @files = ('H23B'); my $thr2 = async { foreach (@files) { ... } }; $thr2->join(); if (my $err = $thr2->error()) { warn("Thread error: $err\n"); } ----------------------------------- Thread error: Unimplemented at D:\perl_test\QU\ba.pl line 40.
cups_book2010-08-23 16:04:27
use threads ('yield', 'stack_size' => 64*4096, 'exit' => 'threads_only', 'stringify'); 上面的例子中用这个use 也可以。
cups_book2010-08-23 16:02:43
use threads; use threads::shared; sub start_thread { my @args = @_; print('Thread started: ', join(' ', @args), "\n"); } my $thr = threads->create('start_thread', 'argument'); $thr->join();
登录 注册