libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Question on Async support


From: silvioprog
Subject: Re: [libmicrohttpd] Question on Async support
Date: Thu, 23 Aug 2018 15:45:14 -0300

Hello Santos.

Yes, you can use your own main loop. Please see:

"The fourth threading model (used when no specific flag is given), uses no threads. Instead, the main application must (periodically) request file descriptor sets from MHD, perform a select call and then call MHD_run. MHD_run will then process HTTP requests as usual and return. MHD_run is guaranteed to not block; however, access handlers and response processing callbacks that it invokes may block. This mode is useful if a single-threaded implementation is desired and in particular if the main application already uses a select loop for its processing." More ...

Enjoy MHD! ☺

On Thu, Aug 23, 2018 at 3:36 PM Santos Das <address@hidden> wrote:
Hi,

Thank you for the quick reply. I have one more question, please help in clarifying -

Can "libmicrohttpd" run as a part of the application event loop or is it mandatory for the  "libmicrohttpd"  to have its own event loop?

thanks, santos

On Thu, Aug 23, 2018 at 11:58 PM, Christian Grothoff <address@hidden> wrote:
On 08/23/2018 06:21 PM, Santos Das wrote:
> Hi,
>
> Can anyone please confirm if libmicrohttpd supports the Async handling?

Yes, it supports asynchronous processing.

> Also, any information on the performance of libmicrohttps will be useful.

Let's just say if used properly, it will never be anywhere near the
bottleneck. We know people running 100,000 requests/s on a single system
with MHD years ago. Quite likely to do more today, but very difficult to
test: when benchmarking, you will always be benchmarking your clients,
your network or your application logic long before hitting any MHD
threshold (on sane operating systems).




--
Silvio Clécio

reply via email to

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