mirror of
https://github.com/wassname/ray.git
synced 2026-08-15 12:45:23 +08:00
fix a bug that move a const variable (#9080)
This commit is contained in:
@@ -389,14 +389,14 @@ void WorkerPool::PushWorker(const std::shared_ptr<Worker> &worker) {
|
||||
// The worker is used for the actor creation task with dynamic options.
|
||||
// Put it into idle dedicated worker pool.
|
||||
const auto task_id = it->second;
|
||||
state.idle_dedicated_workers[task_id] = std::move(worker);
|
||||
state.idle_dedicated_workers[task_id] = worker;
|
||||
} else {
|
||||
// The worker is not used for the actor creation task without dynamic options.
|
||||
// Put the worker to the corresponding idle pool.
|
||||
if (worker->GetActorId().IsNil()) {
|
||||
state.idle.insert(std::move(worker));
|
||||
state.idle.insert(worker);
|
||||
} else {
|
||||
state.idle_actor[worker->GetActorId()] = std::move(worker);
|
||||
state.idle_actor[worker->GetActorId()] = worker;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user