Commit 17734667 authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

added enable_remote_shutdown and shutdown_remote_engine

parent 92825352
......@@ -333,6 +333,18 @@ public:
m_finalize_callbacks.emplace(std::forward<F>(f));
}
/**
* @brief Shuts down a remote thallium engine. The remote engine
* should have enabled remote shutdown by calling enable_remote_shutdown().
*
* @param ep endpoint of the remote engine.
*/
void shutdown_remote_engine(const endpoint& ep) const;
/**
* @brief Enables this engine to be shutdown remotely.
*/
void enable_remote_shutdown();
};
} // namespace thallium
......
......@@ -54,5 +54,15 @@ bulk engine::expose(const std::vector<std::pair<void*,size_t>>& segments, bulk_m
return bulk(*this, handle, true);
}
void engine::shutdown_remote_engine(const endpoint& ep) const {
int ret = margo_shutdown_remote_instance(m_mid, ep.m_addr);
hg_return_t r = ret == 0 ? HG_SUCCESS : HG_OTHER_ERROR;
MARGO_ASSERT(r, margo_shutdown_remote_instance);
}
void engine::enable_remote_shutdown() {
margo_enable_remote_shutdown(m_mid);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment