diff --git a/src/client-ocurl/config.ml b/src/client-ocurl/config.ml index bda563e4..2ea68fb7 100644 --- a/src/client-ocurl/config.ml +++ b/src/client-ocurl/config.ml @@ -35,7 +35,7 @@ let pp out self = let make ?(debug = !debug_) ?(url = get_url ()) ?(headers = get_headers ()) ?(batch_timeout_ms = 2_000) ?(bg_threads = 4) ?(ticker_thread = true) ?(ticker_interval_ms = 500) ?(self_trace = false) () : t = - let bg_threads = max 2 (min bg_threads 32) in + let bg_threads = max 1 (min bg_threads 32) in { debug; url; diff --git a/src/client-ocurl/config.mli b/src/client-ocurl/config.mli index d5dddf30..dfc35c08 100644 --- a/src/client-ocurl/config.mli +++ b/src/client-ocurl/config.mli @@ -15,13 +15,16 @@ type t = private { only checked when a new event occurs or when a tick is emitted. Default 2_000. *) bg_threads: int; - (** Are there background threads, and how many? Default [4] *) + (** Are there background threads, and how many? Default [4]. + This will be adjusted to be at least [1] and at most [32]. *) ticker_thread: bool; (** If true, start a thread that regularly checks if signals should be sent to the collector. Default [true] *) ticker_interval_ms: int; (** Interval for ticker thread, in milliseconds. This is only useful if [ticker_thread] is [true]. + This will be clamped between [2 ms] and some longer + interval (maximum [60s] currently). Default 500. @since NEXT_RELEASE *) self_trace: bool;