design change

This commit is contained in:
msqr1
2024-01-31 10:40:05 -08:00
parent 4fc670f2b8
commit f7acda0006
14 changed files with 355 additions and 251 deletions

View File

@@ -17,7 +17,7 @@ bool genericModel::checkModel() {
return id.compare(oldid) == 0 ? true : false;
}
void genericModel::afterFetch(int memAddr, size_t size) {
// FIXME: Recognizer can reuse this thread to avoid respawning threads
// FIXME: Recognizer reuse this thread if possible
std::thread t{[this, memAddr, size](){
char* modelData = reinterpret_cast<char*>(memAddr);
if(!extractModel(modelData, size)) {
@@ -34,8 +34,8 @@ void genericModel::afterFetch(int memAddr, size_t size) {
return;
}
idFile << id;
if(!load())
fireEv("_continue", ".", index);
idFile.close();
load(false);
}};
t.detach();
}