Commit Graph

9 Commits

Author SHA1 Message Date
Martin Chang
4210dbce07
Revert OS X CI fix (#721) 2021-02-17 09:58:33 +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
Martin Chang
a060351f7a
Fix CI fail on OS X (#699) 2021-02-03 13:10:08 +08:00
An Tao
66fbb33956
Add format check to actions (#668) 2020-12-26 14:39:38 +08:00
An Tao
566297d4df
Create cmake.yml (#653) 2020-12-13 18:12:30 +08:00
antao
c89835cca2 Create FUNDING.yml 2019-11-15 12:35:36 +08:00
an-tao
e341488338 Restore .github folder 2019-03-20 23:26:58 +08:00
zhangjunjun
a580f89c8b Add query test in db_test.cc for orm_lib 2019-03-20 21:56:56 +08:00
an-tao
2f6448e6b2 Update issue templates 2018-11-16 18:29:27 +08:00