#include "mythread.h"
#include <QThreadPool>
#include <QApplication>
/*
* QRunnable:
* virtual void run()
* void QRunnable :: setAutoDelete(bool autoDelete)
*
* QThreadPool:
* void setMaxThreadCount(int maxThreadCount) max number of thread
* void start(QRunnable *runnable, int priority = 0) run thread
* void setExpiryTimeout(int expiryTimeout) thread run time
* int activeThreadCount() const active thread
*
*
*/
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
system(QString("rm %1").arg(file_name).toStdString().c_str());
QThreadPool pool;
pool.setMaxThreadCount(100);//max number of thread
//------------- construct IP list-----------------
for(int i=0;i<255;i++)
for(int j=20;j<50;j++)
pool.start(new MyThread(QString("125.217.%2.%1").arg(i).arg(j)));
return 0;
}
qt5多线程pingIP地址(线程池)
1星 需积分: 43 31 浏览量
2019-04-02
18:08:56
上传
评论 3
收藏 4KB ZIP 举报
zylgbin
- 粉丝: 27
- 资源: 29
最新资源
- 常用工具集参考用于图像等数据处理
- 音乐展示网页、基于Stenography的图像数字水印添加与提取,以及基于颜色矩和Tamura算法的图像相似度评估算法py源码
- 基于EmguCV(OpenCV .net封装),图像数字水印加解密算法的实现,其中包含最低有效位算法,离散傅里叶变换算法+文档书
- 基于matlab+DWT的图像水印项目,数字水印+源代码+文档说明+图片+报告pdf
- (优秀毕业设计)基于python实现的数字图像可视化水印系统的设计与实现,多种数字算法实现+源代码+文档说明+理论演示pdf
- 基于DWT-DCT-SVD和deflate压缩的数字水印方法python源码+Gui界面+演示视频(高分毕业设计)
- 基于matlab实现DWT、DCT、SVD算法数字图像水印可视化系统+GUI界面+文档说明+详细注释(高分毕业设计)
- NCIAE-Data-Structure大一大二笔记
- 学习wireshark笔记
- digital-image-数据可视化笔记
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈