Commit Graph

6 Commits

Author SHA1 Message Date
an-tao e5c9c3a947 Update README 2021-03-23 23:13:20 +08:00
Martin Chang a2142dd93e
Coroutine support (#693)
* app().registerHttpHandler() accepts coroutine as handlers
* HttpController can use coroutine as handlers'
* Http request handlers with coroutine catches exception instead of crashing the entire app
* DbClient now has execSqlCoro that is awaitable
* DbClient now has newTransactionCoro that is awaitable
* HttpClient have awaitable sendRequestCoro
* WebSocketClient have awaitable connectToServerCoro
* WebSocketClient have setAsyncMessageHandler and setAsyncConnectionClosedHandler
* drogon::AsyncTask and drogon::Task<T> as our corutine types
* Related tests
* Misc

Future work
* Coroutine for WebSocket server
* Known issues

co_future() and sync_wait may crash. It looks like GCC bug but I'm not sure.
Workarround: Make an coroutine of AsyncTask. Then launch said coroutine.
Not sure why wrapping the exact same thing in function crashes things.

Co-authored-by: an-tao <antao2002@gmail.com>
2021-02-06 17:05:58 +08:00
An Tao 566297d4df
Create cmake.yml (#653) 2020-12-13 18:12:30 +08:00
Rafał Bugajewski 72a4cad9c1
Added OpenBSD as Supported Operating System 2020-11-15 15:59:52 +01:00
Martin Chang fb7d73be06
Use TW terminology for the TW document (#601) 2020-10-07 00:20:42 +08:00
Haceau-Zoac 2ffd4738b2
Add zh-TW README.md (#593) 2020-10-03 23:34:29 +08:00