babelouest / ulfius

Web Framework to build REST APIs, Webservices or any HTTP endpoint in C language. Can stream large amount of data, integrate JSON data with Jansson, and create websocket services
https://babelouest.github.io/ulfius
GNU Lesser General Public License v2.1
1.07k stars 183 forks source link

[Question] this a thread blocking request library? #220

Closed sirlordt closed 2 years ago

sirlordt commented 2 years ago

this library use pool events for handle request for not thread blocking way? Like libev or libhv?

babelouest commented 2 years ago

Hello,

In Ulfius, the pool event algorithm is handled by libmicrohttpd using the flags MHD_USE_THREAD_PER_CONNECTION and MHD_USE_INTERNAL_POLLING_THREAD see source code.

How libmicrohttpd manages its pool events is documented in its website: https://www.gnu.org/software/libmicrohttpd/manual/libmicrohttpd.html#Thread-modes-and-event-loops

babelouest commented 2 years ago

@sirlordt , does this answer your question?

sirlordt commented 2 years ago

Yes thanks!!!.