Struct UpdateCommand

Struct Documentation

struct UpdateCommand

Commands sent to update the Manager consist of an ID, a key value (string), an integer, and a pointer to an exception so if the update fails for some reason, this information is communicated back to the requester.

Public Functions

inline explicit UpdateCommand(UpdateCommandType cmd, std::string key = "", void *object = nullptr, void *retval = nullptr)

Constructor for UpdateCommand.

Public Members

UpdateCommandType cmd

the command ID

std::string key

a string key that a command can make use of. Usually identifies the worker

void *object

pointer to an arbitrary object

void *retval = nullptr

pointer to a caller-allocated variable to hold the return value

std::exception_ptr eptr = nullptr

The caller making a request through the update mechanism should catch this exception which is thrown if the requested update fails so the caller is not waiting endlessly.