forked from OSchip/llvm-project
[Orc][RPC] Add a class-method version of addHandler to MultiThreadedRPCEndpoint.
This brings MultiThreadedRPCEndpoint's addHandler API in-line with SingleThreadedRPCEndpoint's. This will be tested in an up-coming unit-test for MultiThreadedRPCEndpoint. llvm-svn: 291376
This commit is contained in:
parent
8fa6d8db9c
commit
184d5d720b
|
@ -1062,6 +1062,15 @@ public:
|
|||
std::move(Launch));
|
||||
}
|
||||
|
||||
/// Add a class-method as a handler.
|
||||
template <typename Func, typename ClassT, typename RetT, typename... ArgTs>
|
||||
void addHandler(ClassT &Object, RetT (ClassT::*Method)(ArgTs...),
|
||||
LaunchPolicy Launch = LaunchPolicy()) {
|
||||
addHandler<Func>(
|
||||
detail::MemberFnWrapper<ClassT, RetT, ArgTs...>(Object, Method),
|
||||
Launch);
|
||||
}
|
||||
|
||||
/// Negotiate a function id for Func with the other end of the channel.
|
||||
template <typename Func> Error negotiateFunction() {
|
||||
using OrcRPCNegotiate = typename BaseClass::OrcRPCNegotiate;
|
||||
|
|
Loading…
Reference in New Issue