LLVM
8.0.1
|
#include "llvm/ExecutionEngine/Orc/RPCUtils.h"
Public Types | |
template<typename Func > | |
using | NonBlockingCallResult = typename detail::ResultTraits< typename Func::ReturnType >::ReturnFutureType |
Return type for non-blocking call primitives. More... | |
Public Member Functions | |
MultiThreadedRPCEndpoint (ChannelT &C, bool LazyAutoNegotiation) | |
template<typename Func , typename HandlerT > | |
void | addHandler (HandlerT Handler) |
Add a handler for the given RPC function. More... | |
template<typename Func , typename ClassT , typename RetT , typename... ArgTs> | |
void | addHandler (ClassT &Object, RetT(ClassT::*Method)(ArgTs...)) |
Add a class-method as a handler. More... | |
template<typename Func , typename HandlerT > | |
void | addAsyncHandler (HandlerT Handler) |
template<typename Func , typename ClassT , typename RetT , typename... ArgTs> | |
void | addAsyncHandler (ClassT &Object, RetT(ClassT::*Method)(ArgTs...)) |
Add a class-method as a handler. More... | |
template<typename Func , typename... ArgTs> | |
Expected< NonBlockingCallResult< Func > > | appendCallNB (const ArgTs &... Args) |
Call Func on Channel C. More... | |
template<typename Func , typename... ArgTs> | |
Expected< NonBlockingCallResult< Func > > | callNB (const ArgTs &... Args) |
The same as appendCallNBWithSeq, except that it calls C.send() to flush the channel after serializing the call. More... | |
template<typename Func , typename... ArgTs, typename AltRetT = typename Func::ReturnType> | |
detail::ResultTraits< AltRetT >::ErrorReturnType | callB (const ArgTs &... Args) |
Call Func on Channel C. More... | |
Error | handlerLoop () |
Handle incoming RPC calls. More... | |
Public Member Functions inherited from llvm::orc::rpc::detail::RPCEndpointBase< MultiThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >, ChannelT, FunctionIdT, SequenceNumberT > | |
RPCEndpointBase (ChannelT &C, bool LazyAutoNegotiation) | |
Construct an RPC instance on a channel. More... | |
Error | negotiateFunction (bool Retry=false) |
Negotiate a function id for Func with the other end of the channel. More... | |
Error | appendCallAsync (HandlerT Handler, const ArgTs &... Args) |
Append a call Func, does not call send on the channel. More... | |
Error | sendAppendedCalls () |
Error | callAsync (HandlerT Handler, const ArgTs &... Args) |
Error | handleOne () |
Handle one incoming call. More... | |
void | abandonPendingResponses () |
Abandon all outstanding result handlers. More... | |
void | removeHandler () |
Remove the handler for the given function. More... | |
void | clearHandlers () |
Clear all handlers. More... | |
Definition at line 1356 of file RPCUtils.h.
using llvm::orc::rpc::MultiThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >::NonBlockingCallResult = typename detail::ResultTraits< typename Func::ReturnType>::ReturnFutureType |
Return type for non-blocking call primitives.
Definition at line 1400 of file RPCUtils.h.
|
inline |
Definition at line 1367 of file RPCUtils.h.
|
inline |
Definition at line 1386 of file RPCUtils.h.
|
inline |
Add a class-method as a handler.
Definition at line 1392 of file RPCUtils.h.
|
inline |
Add a handler for the given RPC function.
This installs the given handler functor for the given RPC Function, and makes the RPC function available for negotiation/calling from the remote.
Definition at line 1374 of file RPCUtils.h.
|
inline |
Add a class-method as a handler.
Definition at line 1380 of file RPCUtils.h.
|
inline |
Call Func on Channel C.
Does not block, does not call send. Returns a pair of a future result and the sequence number assigned to the result.
This utility function is primarily used for single-threaded mode support, where the sequence number can be used to wait for the corresponding result. In multi-threaded mode the appendCallNB method, which does not return the sequence numeber, should be preferred.
Definition at line 1410 of file RPCUtils.h.
|
inline |
Call Func on Channel C.
Blocks waiting for a result. Returns an Error for void functions or an Expected<T> for functions returning a T.
This function is for use in threaded code where another thread is handling responses and incoming calls.
Definition at line 1456 of file RPCUtils.h.
|
inline |
The same as appendCallNBWithSeq, except that it calls C.send() to flush the channel after serializing the call.
Definition at line 1435 of file RPCUtils.h.
|
inline |
Handle incoming RPC calls.
Definition at line 1464 of file RPCUtils.h.