From 47cb9810f16afbf7726a959463e0d4ac3f4a09d3 Mon Sep 17 00:00:00 2001 From: Balazs Racz Date: Fri, 29 Dec 2023 10:10:49 +0100 Subject: [PATCH] Ensures that an executor thread can not be created twice. --- src/os/OS.hxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/os/OS.hxx b/src/os/OS.hxx index e4cb385d8..50edeb6cd 100644 --- a/src/os/OS.hxx +++ b/src/os/OS.hxx @@ -77,6 +77,7 @@ public: */ void start(const char *name, int priority, size_t stack_size) { + HASSERT(!is_created()); os_thread_create(&handle, name, priority, stack_size, start, this); }