mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
reduce copies in ThreadPool
This commit is contained in:
parent
d14f5d6dfd
commit
79eb185530
7 changed files with 35 additions and 26 deletions
|
|
@ -354,7 +354,7 @@ std::shared_ptr<Task> AssetsLoader::startTask(runnable onDone) {
|
|||
std::make_shared<util::ThreadPool<aloader_entry, assetload::postfunc>>(
|
||||
"assets-loader-pool",
|
||||
[=]() { return std::make_shared<LoaderWorker>(this); },
|
||||
[this](const assetload::postfunc& func) { func(&assets); }
|
||||
[this](assetload::postfunc&& func) { func(&assets); }
|
||||
);
|
||||
pool->setOnComplete(std::move(onDone));
|
||||
while (!entries.empty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue