mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-12-02 11:47:56 +08:00
a2142dd93e
* 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> |
||
---|---|---|
.. | ||
CacheMapTest2.cc | ||
CacheMapTest.cc | ||
ClassNameTest.cc | ||
CMakeLists.txt | ||
CookiesTest.cc | ||
CoroutineTest.cc | ||
GzipTest.cc | ||
HttpFullDateTest.cc | ||
HttpViewDataTest.cc | ||
MainLoopTest2.cc | ||
MainLoopTest.cc | ||
UrlCodecTest.cc |