Skip to content

Standardize ProcessMessage to allow custom handling of resulting output #33

@mathemaphysics

Description

@mathemaphysics

The virtual ProcessMessage function in IWorker takes four arguments, the final two with default nullptr values to allow it to be called with only the first two, the inputs only. Currently the only place to handle processed data returned from ProcessMessage is in the operator() loop function. For a user to make use of this it would require overloading the loop itself.

Rewrite the loop function in IWorker to check for those additional output arguments and process them according to user specifications, possibly via addition of another virtual function such as ProcessResult.

There may be an easier way to create this functionality using multiple workers/queues. Part of ProcessMessage could obviously simply be to submit the result to another queue or IWorker. Choose whichever is best and implement it.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions