libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] life of the strings / variables in callback


From: chaman bagga
Subject: [libmicrohttpd] life of the strings / variables in callback
Date: Sat, 7 Feb 2015 18:00:04 +0000 (UTC)


Hi,

Can someone point out whether the variables are valid in the MHD_AccessHandlerCallback even after returning from callback when using Suspend / Resume?

I'm running an http server with internal Select + epoll on linux, with a thread pool consisting of 4 threads. From MHD_AccessHandlerCallback,  I call suspend as my processing happens asynchronously in a different task. It requires an LDAP lookup. On getting a response on LDAP, I resume the connection and enqueue the response from the callback. This is as described in [libmicrohttpd] Trouble getting a response sent from a separate worker thread (with external select)


At present, I am copying all the strings (url, upload_data etc.) as its not clear if it is safe to pass the pointers to other threads, or if the pointers are invalid once the callback returns.

Response is appreciated.

Chaman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]