修正一个线程分发BUG,线程在stard()后并不会立即启动,导致线程统计延迟无法正确限制线程数量。
This commit is contained in:
@@ -57,6 +57,12 @@ Widget::Widget(QWidget *parent)
|
||||
dispatch_thread->start();
|
||||
connect(dispatch_thread, &dispatch::dispatch_finish, [=]()
|
||||
{
|
||||
ui->IP_list->setReadOnly(false);
|
||||
ui->port_list->setReadOnly(false);
|
||||
ui->timeout->setReadOnly(false);
|
||||
ui->threads->setReadOnly(false);
|
||||
ui->stard_scan->setText("开始扫描");
|
||||
scan_flag=0;
|
||||
qDebug() << "dispatch_finish";
|
||||
disconnect(dispatch_thread);
|
||||
//delete dispatch_thread;
|
||||
@@ -64,12 +70,7 @@ Widget::Widget(QWidget *parent)
|
||||
}else
|
||||
{
|
||||
//dispatch_thread->exit();
|
||||
ui->IP_list->setReadOnly(false);
|
||||
ui->port_list->setReadOnly(false);
|
||||
ui->timeout->setReadOnly(false);
|
||||
ui->threads->setReadOnly(false);
|
||||
ui->stard_scan->setText("开始扫描");
|
||||
scan_flag=0;
|
||||
|
||||
}
|
||||
|
||||
});//'scan button pass'
|
||||
|
||||
Reference in New Issue
Block a user