perl thread
#!/usr/local/bin/perl
use threads; @domain = ("tom.com", "chinadns.com", "163.com", "aol.com");
for ($i=;$i<;$i++)
{
print $i.'.'.$domain[$i].' ';
}
print "\n"; my $thr0 = threads->new(\&checkwhois, '0', $domain[]);
my $thr1 = threads->new(\&checkwhois, '1', $domain[]);
my $thr2 = threads->new(\&checkwhois, '2', $domain[]);
my $thr3 = threads->new(\&checkwhois, '3', $domain[]); sub checkwhois()
{
my ($l,$r)=@_;
my $i=;
while($i<)
{
$i*$i;
$i++;
}
print "done --$l\t\n";
print $l.$r." query successful! \n";
} $thr0->join;
$thr1->join;
$thr2->join;
$thr3->join;
perl thread的更多相关文章
- centos 7.0 phpize 扩展php
phpize扩展php模块 phpize 所在目录 /usr/etc/php/bin/phpize 查看当前php配置情况 /usr/etc/php/bin/下面的php [root@localhos ...
- 服务管理之httpd
目录 1. httpd简介 2. httpd版本 2.2 httpd-2.4新增的模块 3. httpd基础 3.1 httpd自带的工具程序 3.2 rpm包安装的httpd程序环境 3.3 web ...
- FastDFS + Nginx代理方式访问
FastDFS + Nginx代理方式访问 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.在storage上安装nginx 1>.下载nginx软件(http://ngi ...
- Redis笔记 -- 在 Centos7.4单机中部署Redis集群(二)
0x00--背景和目的 在单台PC服务器上部署Redis集群,通过不同的TCP端口启动多实例,模拟多台独立PC组成集群. 0x01--环境描述: Centos版本:CentOS Linux relea ...
- centos 上安装redis 3.0.5
官网下载安装包,直接使用make编译,报如下错误 : [root@localhost redis-3.0.5]# make cd src && make all make[1]: 进入 ...
- Httpd服务进阶知识-LAMP源码编译安装
Httpd服务进阶知识-LAMP源码编译安装 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 想必大家都知道,动态资源交给fastcgi程序处理,静态资源依旧由httpd服务器处理 ...
- Linux系统WEB服务之Nginx基础入门
一.Nginxi简介 Nginx是什么?它是一个开源.高性能的WEB服务器软件和代理服务器软件,由俄罗斯人Igor Sysoev 开发实现.它的功能主要分三类,第一是它作为一个WEB服务软件使用:第二 ...
- Redis简介与部署
一.简介 Redis是什么?redis是一款基于BSD协议,开源的非关系型数据库(nosql数据库),作者是意大利开发者Salvatore Sanfilippo在2009年发布,使用C语言编写:red ...
- Memcached高可用组件之repcached
在前边的tomcat session server msm的那篇博客我们用memcached做tomcat session服务器,默认官方memcached是不支持主从同步的,为了解决memcache ...
随机推荐
- CSS3 border-radius 属性和CSS outline 属性
CSS3 border-radius 属性 border-radius 属性是一个简写属性,用于设置四个 border-*-radius 属性. 提示:该属性允许为元素添加圆角边框! 注释:按此顺序设 ...
- Android开发中,那些让你相见恨晚的方法、类或接口
1.getParent().requestDisallowInterceptTouchEvent(true);剥夺父view 对touch 事件的处理权,谁用谁知道. 2.ArgbEvaluator. ...
- Unity球形插值Slerp解析
Unity球形插值,官方有个太阳升降的例子: http://docs.unity3d.com/ScriptReference/Vector3.Slerp.html 一开始主观认为这个球形插值Slerp ...
- 转——Android测试之monkey
一.为什么要用Monkey 测试? 简单在说就是象猴子一样乱点,为了测试软件的稳定性,健壮性.号称最快速有效的方法.有时候运行相同系列的测试,即使是复杂的测试,但是以相同的顺序和路径,即使一遍又一 ...
- SDUT 2772 数据结构实验之串一:KMP简单应用
数据结构实验之串一:KMP简单应用 Time Limit: 1000MS Memory Limit: 65536KB Submit Statistic Problem Description 给定两个 ...
- windows installer 出错问题解决
在卸载程序的额时候,如果出现windows installer出错,可以通过一个Windows Installer CleanUp Utility, 有了Windows Installer Clean ...
- C# 多线程传参
using System; using System.Threading; //多线程调试: 2013.10.08 namespace ThreadExample { class App { publ ...
- C#中string类型前加@标志的作用
转自:http://stackoverflow.com/questions/4879152/c-sharp-before-a-string (stackoverflow) string字符串前加@ ...
- Android IOS WebRTC 音视频开发总结(三四)-- windows.20150706
最近好不容易更新了PC版的WEBRTC,总结下有哪些调整,文章来自博客园RTC.Blacker,支持原创,转载请说明出处. 图1:解决方案工程结构对比: 说明: 1, 最大的调整就是移除了VideoE ...
- linux mysql开启远程链接
x:\>mysql -u root -pvmware mysql> use mysql; mysql> update user set host = ‘%’ where user = ...