On 12/2/19 4:49 PM, José Bollo wrote:
> On Mon, 2 Dec 2019 15:08:39 +0100
> José Bollo <jo...@nonadev.net> wrote:
> 
>> On Mon, 2 Dec 2019 15:04:52 +0100
>> José Bollo <jo...@nonadev.net> wrote:
>>
>> rereading comment of MHD_USE_INTERNAL_POLLING_THREAD my question looks
>> stupid
> 
> No in fact the question is serious. There is no simple way to let run
> MHD on the main thread. It requires implementing an external
> poll/select loop.
> 
> Can you provide an integrated main that serves and doesn't return until
> stopped?

That doesn't make sense to me, as then we don't have a 'stop' condition.
With the internal polling thread, you can simply implement a while (!
stop); yourself, and if you never want to stop, "while(1) sleep(1);"
would do.

But usually you then _must_ do something else until you encounter your
stop condition, and so that is what you should implement. Or you have an
existing event loop, in which case you should use MHD's external event loop.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to