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

break: remove co_attach & enforce event handler call semantics (return void/dpp::job, take const event) #807

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

Mishura4
Copy link
Member

@Mishura4 Mishura4 commented Aug 25, 2023

Context (accessible to reviewers)
For non-reviewers, the tl;dr is std::function does very little to enforce call semantics such as a return type.
This PR actually enforces the call semantics using type traits. It also removes co_attach and now unifies usage for coro / non coro event handlers (you attach a coro event handler using attach or operator()).

  • My pull request is made against the dev branch.
  • I have ensured that the changed library can be built on your target system. I did not introduce any platform-specific code.
  • I have ensured that all methods and functions are fully documented using doxygen style comments.
  • I tested my commits, by adding a test case to the unit tests if needed
  • I have ensured that I did not break any existing API calls.
  • My code follows the coding style guide (if you are not sure, match the code style of existing files including indent style etc).
  • I have not built my pull request using AI, a static analysis tool or similar without any human oversight. Where I have generated this pull request using a tool, I have justified why this is needed.

@netlify
Copy link

netlify bot commented Aug 25, 2023

Deploy Preview for dpp-dev ready!

Name Link
🔨 Latest commit f29aa87
🔍 Latest deploy log https://app.netlify.com/sites/dpp-dev/deploys/64ec0c6a262cef0007748635
😎 Deploy Preview https://deploy-preview-807--dpp-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Mishura4 Mishura4 marked this pull request as draft August 25, 2023 19:56
@Mishura4 Mishura4 marked this pull request as ready for review August 25, 2023 23:48
Copy link
Contributor

@braindigitalis braindigitalis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't the coro docs need to be updated to reflect this change? please dismiss review if this will be a separate pr

@Mishura4
Copy link
Member Author

TRUE i forgor, nice catch. Will update tomorrow

@Mishura4 Mishura4 force-pushed the event_router branch 2 times, most recently from 090b08e to f888207 Compare August 26, 2023 13:26
@Mishura4
Copy link
Member Author

Mishura4 commented Aug 26, 2023

Updated the docs (diff here)

@Mishura4
Copy link
Member Author

This will likely conflict with #808 as well, if it's merged first I'll resolve them on my end

@Mishura4 Mishura4 force-pushed the event_router branch 2 times, most recently from 298f5cd to 8f76c16 Compare August 26, 2023 14:19
@Mishura4 Mishura4 merged commit a61508e into brainboxdotcc:dev Aug 28, 2023
@Mishura4 Mishura4 deleted the event_router branch August 30, 2023 15:07
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

Successfully merging this pull request may close these issues.

3 participants