Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize ProcessMessage to allow custom handling of resulting output #33

Open
mathemaphysics opened this issue Jun 9, 2022 · 0 comments
Assignees

Comments

@mathemaphysics
Copy link
Owner

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.

@mathemaphysics mathemaphysics self-assigned this Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant