enhance: add configuration items to adjust the scheduling parameters of the main loop
This commit is contained in:
@@ -197,6 +197,7 @@ static void *dumpfile_thread(void *arg)
|
||||
PACKET_IO_LOG_STATE("dumpfile io thread is running");
|
||||
|
||||
scan_directory(handle->directory, dumpfile_handler, arg);
|
||||
PACKET_IO_LOG_STATE("dumpfile io thread processed all pcap files");
|
||||
|
||||
while (ATOMIC_READ(&handle->io_thread_need_exit) == 0)
|
||||
{
|
||||
@@ -205,11 +206,10 @@ static void *dumpfile_thread(void *arg)
|
||||
ATOMIC_SET(&handle->io_thread_wait_exit, 1);
|
||||
}
|
||||
|
||||
PACKET_IO_LOG_STATE("dumpfile io thread has processed all pcap files, wait for exit");
|
||||
sleep(1);
|
||||
usleep(1000); // 1ms
|
||||
}
|
||||
|
||||
PACKET_IO_LOG_STATE("dumpfile io thread exit !!!");
|
||||
PACKET_IO_LOG_STATE("dumpfile io thread exit");
|
||||
ATOMIC_SET(&handle->io_thread_is_runing, 0);
|
||||
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user