perl中的lock
摘要:
1 #!/usr/bin/env perl -w 2 use strict; 3 use threads; 4 use threads::shared; 5 6 my $count:shared = 1; 7 print "count的起始值为:$count\n"; 8 sub th_lock{ 9 $count++; 10 print "已把... 阅读全文
posted @ 2017-02-27 00:03 Perl6 阅读(400) 评论(0) 推荐(0) 编辑