Hi,
I'm using the same thread as its related to it.
Wanted to confirm this behavior.
MHD is running with external epoll using no new threads for MHD with suspend/resume.
When we receive external http req, we suspend when response is not sent in same flow, when data is available, connection is resumed. MDH_run is only invoked in epoll loop. So the actually send will be only when this gets invoked right ? so in between resume and send the thread is free and continues. Basically since we have MHD as a layer to app, on send_response we need to save the data, response code, headers etc. If the thread breaks, the send_response caller could free the alloc'ed memory or stack rewind, so which means we need to save this data on heap as when actual send is invoked from accessHandlerCallback, this data is available.
Thanks,
Kunal