Refactored BackgroundJobTracker
This commit is contained in:
@@ -141,7 +141,7 @@ void RandomX_Hasher::set_seed_async(const hash& seed)
|
||||
const int err = uv_queue_work(uv_default_loop_checked(), &work->req,
|
||||
[](uv_work_t* req)
|
||||
{
|
||||
bkg_jobs_tracker.start("RandomX_Hasher::set_seed_async");
|
||||
BACKGROUND_JOB_START(RandomX_Hasher::set_seed_async);
|
||||
Work* work = reinterpret_cast<Work*>(req->data);
|
||||
if (!work->pool->stopped()) {
|
||||
work->hasher->set_seed(work->seed);
|
||||
@@ -150,7 +150,7 @@ void RandomX_Hasher::set_seed_async(const hash& seed)
|
||||
[](uv_work_t* req, int)
|
||||
{
|
||||
delete reinterpret_cast<Work*>(req->data);
|
||||
bkg_jobs_tracker.stop("RandomX_Hasher::set_seed_async");
|
||||
BACKGROUND_JOB_STOP(RandomX_Hasher::set_seed_async);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user