brainboxdotcc / DPP

C++ Discord API Bot Library - D++ is Lightweight and scalable for small and huge bots!
https://dpp.dev/
Apache License 2.0
1.01k stars 155 forks source link

feat(coro): coro 2.0 #1188

Closed Mishura4 closed 6 days ago

Mishura4 commented 1 week ago

This is a massive PR that fundamentally changes the coro implementation, everything is a derivative of dpp::awaitable and dpp::promise now. This helps with de-duplicating a lot of coro-related code, making it easier to maintain, and offers a way to add things to all of the coroutine types at once, for example the sync_wait method available on all awaitable types, which can help for example with starting a coroutine from a non-coroutine.

Still missing some documentation & polishing

Code change checklist

CLAassistant commented 1 week ago

CLA assistant check
All committers have signed the CLA.

netlify[bot] commented 1 week ago

Deploy Preview for dpp-dev ready!

Name Link
Latest commit 6eef94ad745260c13a7dd943c59212a8c1e8d839
Latest deploy log https://app.netlify.com/sites/dpp-dev/deploys/668fdaea61faa60008cce518
Deploy Preview https://deploy-preview-1188--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.

Jaskowicz1 commented 1 week ago

This is huge, god damn.

I'll pull this branch locally and test this with my bot, will give you a shout on Discord if I have any issues!

braindigitalis commented 1 week ago

lgtm, will test it out when its in dev as the coro features in my bot arent complete so i can't test this thoroughly.

Mishura4 commented 6 days ago

Closing to reopen from https://github.com/brainboxdotcc/DPP/tree/coro