DuplexQueue

Request/response construct for sending requests from one requester to multiple worker threads

Members

Functions

open
void open(size_t numWorkers)

Register number of worker threads

pullRequest
bool pullRequest(T val)

worker-thread APIs

pullResult
bool pullResult(T val)

Receive a single response

submitRequest
bool submitRequest(T val)

Submit a single request

submitResult
bool submitResult(T val)

worker-thread APIs

Variables

inputs
MCSPQueue!(T, capacity) inputs;
Undocumented in source.
outputs
SCMPQueue!(T, capacity) outputs;
Undocumented in source.

Parameters

T

type of request. Must be small enough to support atomic loading and storing.

capacity

the queue buffer size.

Meta