From 96daea993eeea17f0c64325491943e48795ff751 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Mon, 8 Apr 2024 16:57:53 +0200 Subject: C++ migration: use std::jthread, std::condition_variable, std::chrono. win32 pthread support is gone new setting configure.shutdown_mode for cancellation of free-running threads at shutdown. no more hard thread termination! If a thread doesn't cooperate, an error is raised. lane.status "killed" is gone lane:cancel can't force-kill. --- src/macros_and_utils.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/macros_and_utils.h') diff --git a/src/macros_and_utils.h b/src/macros_and_utils.h index e29e7fb..997b452 100644 --- a/src/macros_and_utils.h +++ b/src/macros_and_utils.h @@ -11,9 +11,12 @@ extern "C" { #endif // __cplusplus #include +#include #include #include +using namespace std::chrono_literals; + #define USE_DEBUG_SPEW() 0 #if USE_DEBUG_SPEW() extern char const* debugspew_indent; @@ -167,3 +170,5 @@ T* lua_newuserdatauv(lua_State* L, int nuvalue_) std::ignore = lua_error(L); // doesn't return assert(false); // we should never get here, but i'm paranoid } + +using lua_Duration = std::chrono::template duration; -- cgit v1.2.3-55-g6feb