ChinaUnix.net
相关文章推荐:

use threads

这两天开始看一下Perl 的Multi-thread. 以下代码是从perldoc perlthrtut 中copy出来的,但是在我的本地测试中并不会hang (windows 和 Linux). use threads; my $a : shared = 4; my $b : shared = "foo"; my $thr1 = threads->new(sub { lock($a); sleep 20; lock($b); }); my $thr2 = threads->new(sub { lock($b); sleep 20; lock($a); }); Th...

by Eleswen - Perl - 2008-03-18 17:21:53 阅读(3249) 回复(2)

相关讨论

这个贴子(http://bbs.chinaunix.net/thread-1351797-1-1.html)可能是require引起的,所以我想把代码写在一个文件里试试,又出了新的错。郁闷 1 #!/usr/bin/perl 2 # 3 #load 4 use DBI; 5 use strict; 6 use warnings; 7 #use diagnostics; 8 use URI; 9 use threads; 10 11 require("qeesoo_prehandle.conf"); 12 our $log; 13 our $dbh_gdas; ...

by 枫影谁用了 - Perl - 2009-01-13 10:25:09 阅读(3274) 回复(6)

问题同 http://www.perlmonks.org/?node_id=783017 一样 就直接照搬那人的了 无cookie情况下输入网站 并点击下载 图片下载下来了 但是 windows 对话框 Perl Command Line Interpreter 遇到问题需要关闭。我们对此引起的不便表示抱歉。 perl 显示错误如下: Attempt to free non-existent shared string '_TK_RESULT_', Perl interpreter: 0x2e3642c at C:/Perl/lib/Tk.pm line 252. Attempt to free non-existent shared string...

by perlw01f - Perl - 2009-07-27 20:57:44 阅读(1435) 回复(0)

在这里没找到,在csdn上下的

by zhongyj - IT图书与评论 - 2011-11-04 14:35:36 阅读(10843) 回复(12)

Persistent NUMA threads ++

by nntp - 程序开发 - 2006-06-26 14:44:57 阅读(843) 回复(3)

http://www.llnl.gov/computing/tutorials/pthreads/ [ 本帖最后由 cjaizss 于 2006-5-27 16:33 编辑 ]

by cjaizss - C/C++ - 2006-05-27 16:21:29 阅读(779) 回复(0)

如果有中文版的更好 中文书名:POSIX多线程程序设计 这本书现在还有卖的吗(北京),找了很久没找到

by berniechen - IT图书与评论 - 2006-04-08 21:47:45 阅读(2409) 回复(4)

10个线程,每个调用一个子函数100次,一共1000次 子函数: sub Get($){ my $url=shift; my $agent = LWP::userAgent->new; my $request=HTTP::Request->new(GET =>$url); my $response=$agent->request($request); $response->is_success or warn "$url: $response->message\n" and exit 1; 。。。 undef $agent; undef $request; } 不是很明白线程,只是在全启动后...

by dajun - Perl - 2005-11-28 16:32:52 阅读(1530) 回复(2)

由于程序中需要使用OLE,但是OLE好像不是线程安全的,只要引入OLE在线程释放的时候就会报错 请问各位老大如何在多线程环境中使用OLE? #!/usr/bin/env perl use threads; use Win32::OLE; sub sub1 {     $a = 0;     for (my $I = 0; $I < 100; $I++)     {         print "is $I\n";     } &...

by larrykun - Perl - 2008-09-17 12:22:55 阅读(2854) 回复(7)

本人想知道hp-ux11.0中每个进程支持的最大线程数如何查到。多谢!

by lmss - HP-UX - 2003-08-19 16:03:16 阅读(1657) 回复(1)