Skip to content

TConsumerRPCWorker

Runnable worker that drains the gRPC completion queue and enqueues incoming requests.

template <class ServiceType, typename RequestType, typename ResponseType>
class TConsumerRPCWorker : public FRunnable

Methods

TConsumerRPCWorker

inline TConsumerRPCWorker(ServerCompletionQueue *CQueue)

Parameters

  • CQueue (ServerCompletionQueue)

TConsumerRPCWorker

inline ~TConsumerRPCWorker()

Init

inline virtual bool Init()

Initialize the worker.


Run

inline virtual uint32 Run()

This workers main method.


Start

inline void Start()

Start the worker.


Stop

inline virtual void Stop()

Shutdown the worker and it’s associated completion queue.


Exit

inline virtual void Exit()

FRunnable hook; unused for this worker.

Attributes

Thread

FRunnableThread *Thread = nullptr

OS thread running Run() for completion-queue polling.


Requests

TQueue<RequestType> Requests = TQueue<RequestType>()

Fully received requests dequeued from CallData for Poll() consumers.

Source: Source/ScholaProtobuf/Public/ProtobufBackends/gRPC/ConsumerRPCBackend.h