-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support lus thread_pool changes #4127
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1000,7 +1000,7 @@ void SaveManager::SaveSection(int fileNum, int sectionID, bool threaded) { | |
auto saveContext = new SaveContext; | ||
memcpy(saveContext, &gSaveContext, sizeof(gSaveContext)); | ||
if (threaded) { | ||
smThreadPool->push_task_back(&SaveManager::SaveFileThreaded, this, fileNum, saveContext, sectionID); | ||
smThreadPool->detach_task(std::bind(&SaveManager::SaveFileThreaded, this, fileNum, saveContext, sectionID)); | ||
} else { | ||
SaveFileThreaded(fileNum, saveContext, sectionID); | ||
} | ||
|
@@ -1091,7 +1091,7 @@ void SaveManager::LoadFile(int fileNum) { | |
|
||
void SaveManager::ThreadPoolWait() { | ||
if (smThreadPool) { | ||
smThreadPool->wait_for_tasks(); | ||
smThreadPool->wait(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. from https://github.com/bshoshany/thread-pool/releases/tag/v4.0.0
|
||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,10 @@ typedef struct { | |
#include <functional> | ||
#include <vector> | ||
#include <filesystem> | ||
#include "thread-pool/BS_thread_pool.hpp" | ||
|
||
#define BS_THREAD_POOL_ENABLE_PRIORITY | ||
#define BS_THREAD_POOL_ENABLE_PAUSE | ||
Comment on lines
+43
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we use these in LUS, we get errors if we include the header without them before including it in LUS with them from https://github.com/bshoshany/thread-pool/releases/tag/v4.0.0
|
||
#include <BS_thread_pool.hpp> | ||
|
||
#include "z64save.h" | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from https://github.com/bshoshany/thread-pool/releases/tag/v4.0.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.