From d8893bbef2b234c9299bf8fcea23e2fa80cdb201 Mon Sep 17 00:00:00 2001 From: Olivier Nicole Date: Thu, 20 Jan 2022 18:09:43 +0100 Subject: [PATCH] Fix build on OCaml 5.0 (remove deprecated Thread.kill) --- src/lib/ounit2/threads/oUnitRunnerThreads.ml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/ounit2/threads/oUnitRunnerThreads.ml b/src/lib/ounit2/threads/oUnitRunnerThreads.ml index 778bbe8..69f9abc 100644 --- a/src/lib/ounit2/threads/oUnitRunnerThreads.ml +++ b/src/lib/ounit2/threads/oUnitRunnerThreads.ml @@ -143,10 +143,9 @@ let create_worker ~shard_id ~master_id ~worker_log_file conf map_test_cases = Mutex.lock worker_finished_mutex done; if not !worker_finished then begin - (* This will fail... because probably not implemented. *) - Thread.kill thread; - worker_finished := true; - Condition.broadcast worker_finished_cond + (* We should kill [thread] here but there seems to be no way to kill a + thread so we will just fail. *) + raise (Invalid_argument "Thread.kill not implemented") end; Mutex.unlock worker_finished_mutex in