Asynchronous REST tasks #1682
-
Hello, I am currently using Drogon to implement a REST API. My question is : how to do it properly and safely ? on /process request:
Is it safe to do so ? I checked the drogon::MultiPartParser code and it retains a copy of the drogon::HttpRequest shared pointer so I assume the parsed data is valid as long as the drogon::MultiPartParser instance is kept alive in my internal queue. Thanx Etienne |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Yes, you're right, both the MultiPartParser and the parsed result keep the Request shared pointer, so you can do this safely. |
Beta Was this translation helpful? Give feedback.
-
Thnks for your reply |
Beta Was this translation helpful? Give feedback.
Yes, you're right, both the MultiPartParser and the parsed result keep the Request shared pointer, so you can do this safely.