thread pool update + refactor
This commit is contained in:
@@ -92,6 +92,12 @@ void WorldConverter::write() {
|
||||
wfile->write(nullptr, content);
|
||||
}
|
||||
|
||||
void WorldConverter::waitForEnd() {
|
||||
while (isActive()) {
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
uint WorldConverter::getWorkRemaining() const {
|
||||
return tasks.size();
|
||||
}
|
||||
|
||||
@@ -58,6 +58,11 @@ public:
|
||||
tasks = {};
|
||||
}
|
||||
|
||||
bool isActive() const override {
|
||||
return !tasks.empty();
|
||||
}
|
||||
|
||||
void waitForEnd() override;
|
||||
void write();
|
||||
|
||||
uint getWorkRemaining() const override;
|
||||
|
||||
Reference in New Issue
Block a user