Change the worker to store the job using shared_ptr, so caller can still hold a reference to the job for other purpose

This commit is contained in:
Noisyfox
2025-09-29 23:15:15 +08:00
parent ddee9f3976
commit 8611125008
4 changed files with 10 additions and 10 deletions

View File

@@ -170,7 +170,7 @@ bool BoostThreadWorker::wait_for_idle(unsigned timeout_ms)
return !timeout_reached;
}
bool BoostThreadWorker::push(std::unique_ptr<Job> job)
bool BoostThreadWorker::push(std::shared_ptr<Job> job)
{
if (!job)
return false;