mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
quick check with linters
This commit is contained in:
parent
92f185ab51
commit
9522aedeec
55 changed files with 129 additions and 184 deletions
|
|
@ -47,7 +47,7 @@ class ThreadPool : public Task {
|
|||
runnable onComplete = nullptr;
|
||||
std::atomic<int> busyWorkers = 0;
|
||||
std::atomic<uint> jobsDone = 0;
|
||||
bool working = true;
|
||||
std::atomic<bool> working = true;
|
||||
bool failed = false;
|
||||
bool standaloneResults = true;
|
||||
bool stopOnFail = true;
|
||||
|
|
@ -170,7 +170,7 @@ public:
|
|||
onJobFailed(entry.job);
|
||||
}
|
||||
if (stopOnFail) {
|
||||
std::lock_guard<std::mutex> lock(jobsMutex);
|
||||
std::lock_guard<std::mutex> jobsLock(jobsMutex);
|
||||
failed = true;
|
||||
complete = false;
|
||||
}
|
||||
|
|
@ -184,7 +184,7 @@ public:
|
|||
}
|
||||
|
||||
if (onComplete && busyWorkers == 0) {
|
||||
std::lock_guard<std::mutex> lock(jobsMutex);
|
||||
std::lock_guard<std::mutex> jobsLock(jobsMutex);
|
||||
if (jobs.empty()) {
|
||||
onComplete();
|
||||
complete = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue