From cbbb65b213b1eab7d89a571d3b469fc483b939ab Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Tue, 3 Jun 2025 14:59:09 +0200 Subject: [PATCH] Remove uses of 'Lwt_preemptive' `Lwt_preemptive` was not used by Eliom but code was here to print stats about the number of busy threads, which is removed. --- src/lib/server/monitor/eliom_monitor.ml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/lib/server/monitor/eliom_monitor.ml b/src/lib/server/monitor/eliom_monitor.ml index 10e0971d0..a94e75de3 100644 --- a/src/lib/server/monitor/eliom_monitor.ml +++ b/src/lib/server/monitor/eliom_monitor.ml @@ -88,20 +88,6 @@ let lwt_stats () = (Lwt_engine.writable_count ()) ] ; li [ppf "%d sleeping lwt threads" (Lwt_engine.timer_count ())] ] ] -let preemptive_thread_stats () = - div - [ ul - [ li - [ ppf "%d detached threads (min %d,max %d)." - (Lwt_preemptive.nbthreads ()) - (Ocsigen_config.get_minthreads ()) - (Ocsigen_config.get_maxthreads ()) ] - ; li [ppf "%d are busy threads." (Lwt_preemptive.nbthreadsbusy ())] - ; li - [ ppf "%d computations queued (max %d)." - (Lwt_preemptive.nbthreadsqueued ()) - (Ocsigen_config.get_max_number_of_threads_queued ()) ] ] ] - let http_stats () = let hosts = Ocsigen_extensions.get_hosts () in div @@ -185,9 +171,7 @@ let content_div () = ; h2 [ppf "GC"] ; gc_stats () ; h2 [ppf "Lwt threads"] - ; lwt_stats () - ; h2 [ppf "Preemptive threads"] - ; preemptive_thread_stats () ]) + ; lwt_stats () ]) let content_html () = let* content_div = content_div () in