fix: transparently support blocking work without worker threads

This commit is contained in:
Jef Roosens 2024-02-14 12:43:58 +01:00
parent 1b8ba305b5
commit 1f63f06e0c
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
8 changed files with 62 additions and 46 deletions

View file

@ -27,12 +27,12 @@ int main() {
ctx_reset,
ctx_free);
lnm_http_step_init(&step, slow_step);
lnm_http_step_append(&step, slow_step, true);
lnm_http_route_init_literal(&route, lnm_http_method_get, "/", step);
lnm_http_loop_route_add(hl, route);
lnm_log_init_global();
lnm_log_register_stdout(lnm_log_level_debug);
printf("res = %i\n", lnm_http_loop_run(hl, 8080, 1, 32));
printf("res = %i\n", lnm_http_loop_run(hl, 8080, 1, 2));
}