[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] running in main thread
From: |
Christian Grothoff |
Subject: |
Re: [libmicrohttpd] running in main thread |
Date: |
Mon, 2 Dec 2019 17:41:09 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 12/2/19 4:49 PM, José Bollo wrote:
> On Mon, 2 Dec 2019 15:08:39 +0100
> José Bollo <address@hidden> wrote:
>
>> On Mon, 2 Dec 2019 15:04:52 +0100
>> José Bollo <address@hidden> 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.
signature.asc
Description: OpenPGP digital signature
- [libmicrohttpd] running in main thread, José Bollo, 2019/12/02
- Re: [libmicrohttpd] running in main thread, José Bollo, 2019/12/02
- Re: [libmicrohttpd] running in main thread, José Bollo, 2019/12/02
- Re: [libmicrohttpd] running in main thread,
Christian Grothoff <=
- Re: [libmicrohttpd] running in main thread, José Bollo, 2019/12/02
- Re: [libmicrohttpd] running in main thread, Christian Grothoff, 2019/12/02
- Re: [libmicrohttpd] running in main thread, José Bollo, 2019/12/02
- Re: [libmicrohttpd] running in main thread, Christian Grothoff, 2019/12/02
- Re: [libmicrohttpd] running in main thread, Evgeny Grin, 2019/12/04
- Re: [libmicrohttpd] running in main thread, silvioprog, 2019/12/04
- Re: [libmicrohttpd] running in main thread, silvioprog, 2019/12/02
- Re: [libmicrohttpd] running in main thread, silvioprog, 2019/12/02