drogon/lib/tests
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
..
CacheMapTest2.cc Use explicit lambda capture lists (#590) 2020-10-02 11:45:07 +08:00
CacheMapTest.cc Use explicit lambda capture lists (#590) 2020-10-02 11:45:07 +08:00
ClassNameTest.cc Add .clang-format 2019-05-17 22:49:09 +08:00
CMakeLists.txt Coroutine support (#693) 2021-02-06 17:05:58 +08:00
CookiesTest.cc Add .clang-format 2019-05-17 22:49:09 +08:00
CoroutineTest.cc Coroutine support (#693) 2021-02-06 17:05:58 +08:00
GzipTest.cc Optimize performance (#222) 2019-08-24 13:12:04 +08:00
HttpFullDateTest.cc Move utility functions to the utils namespace 2019-03-21 17:47:45 +08:00
HttpViewDataTest.cc Change the line length limit to 80 characters 2019-05-18 11:11:45 +08:00
MainLoopTest2.cc Make app().run() method callable on a non-main thread (#457) 2020-06-06 12:24:06 +08:00
MainLoopTest.cc Port drogon to Windows (#335) 2020-01-25 11:58:20 +08:00
UrlCodecTest.cc Port drogon to Windows (#335) 2020-01-25 11:58:20 +08:00