Skip to content

Commit

Permalink
Remove not need anymore skip
Browse files Browse the repository at this point in the history
  • Loading branch information
mhtvsSFrpHdE committed Aug 8, 2022
1 parent 7b73735 commit fbaa8bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
8 changes: 3 additions & 5 deletions qpp/prefetch/Source/Core/Thread/read_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ QList<QRunnable *> ReadThread::pendingDeleteThread = QList<QRunnable *>();
ReadThread::ReadThread(QString filePath)
{
ReadThread::filePath = filePath;
ReadThread::skip = false;

setAutoDelete(autoDeletePreset);
}
Expand All @@ -37,7 +36,7 @@ bool ReadThread::run_SearchExclude()
if (searchResult != -1)
{
// Cache search result
skip = true;
run_RequestDelete();

return true;
}
Expand Down Expand Up @@ -85,14 +84,14 @@ void ReadThread::run_read()
else
{
// Cache result
skip = true;
run_RequestDelete();
}
}

void ReadThread::run()
{
// Thread is known to skip
if (skip || pause)
if (pause)
{
return;
}
Expand All @@ -104,7 +103,6 @@ void ReadThread::run()
{
if (run_SearchExclude())
{
run_RequestDelete();
return;
}
}
Expand Down
6 changes: 0 additions & 6 deletions qpp/prefetch/Source/Core/Thread/read_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ class ReadThread : public QRunnable
// Save file path
QString filePath;

// Every file need do search to confirm if excluded
// Shall not search again if thread can run multiple times
//
// There are other reasons can change this varialbe too
bool skip;

// Prevent access stdio at same time
static QMutex printLock;

Expand Down

0 comments on commit fbaa8bc

Please sign in to comment.