From dd1cf2a046e998a7de833cd2b2b94f57c0e6b12e Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Wed, 24 Mar 2021 18:44:07 -0400 Subject: [PATCH] perf(pool): try to inline `with_lock` --- src/threads/CCPool.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/threads/CCPool.ml b/src/threads/CCPool.ml index 4bc1816d..2a6b5e95 100644 --- a/src/threads/CCPool.ml +++ b/src/threads/CCPool.ml @@ -55,7 +55,7 @@ module Make(P : PARAM) = struct let set_exn_handler f = pool.exn_handler <- f - let with_lock_ t f = + let[@inline] with_lock_ t f = Mutex.lock t.mutex; try let x = f t in