This commit is contained in:
Dmitri Gekhtman 2021-05-21 11:45:40 -07:00
parent 33d9fc9a8b
commit b65bc65c1a
2 changed files with 11 additions and 11 deletions

View file

@ -2818,15 +2818,16 @@ void CoreWorker::HandleExit(const rpc::ExitRequest &request, rpc::ExitReply *rep
// any object pinning RPCs in flight.
bool is_idle = !own_objects && pins_in_flight == 0;
reply->set_success(is_idle);
send_reply_callback(Status::OK(),
[this, is_idle]() {
// If the worker is idle, we exit.
if (is_idle) {
Exit(rpc::WorkerExitType::INTENDED_EXIT);
}
},
// We need to kill it regardless if the RPC failed.
[this]() { Exit(rpc::WorkerExitType::INTENDED_EXIT); });
send_reply_callback(
Status::OK(),
[this, is_idle]() {
// If the worker is idle, we exit.
if (is_idle) {
Exit(rpc::WorkerExitType::INTENDED_EXIT);
}
},
// We need to kill it regardless if the RPC failed.
[this]() { Exit(rpc::WorkerExitType::INTENDED_EXIT); });
}
void CoreWorker::YieldCurrentFiber(FiberEvent &event) {

View file

@ -75,8 +75,7 @@ int main(int argc, char *argv[]) {
storage->InternalConfigTable().Put(ray::UniqueID::Nil(), config, on_done));
boost::asio::io_service::work work(service);
service.run();
})
.detach();
}).detach();
promise->get_future().get();
const ray::stats::TagsType global_tags = {