From 3204711f22b7d2b8eb6a64180b63464ba864eee4 Mon Sep 17 00:00:00 2001 From: chatlanin Date: Fri, 28 Feb 2025 13:51:32 +0300 Subject: [PATCH] add thread test --- bin/layers/local_panel/local_panel.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/layers/local_panel/local_panel.cpp b/bin/layers/local_panel/local_panel.cpp index cf41c74..36c538d 100755 --- a/bin/layers/local_panel/local_panel.cpp +++ b/bin/layers/local_panel/local_panel.cpp @@ -12,10 +12,15 @@ namespace sandbox void local_panel::render() { - if (ImGui::Button("RUN 2", ImVec2(28, 30))) + if (ImGui::Button("RUN thread", ImVec2(28, 30))) { - VE::event e { test_event::TEST_EVEN , std::string("test event message") }; - VE_EMIT(e); + auto f = []() + { + VE::event e { test_event::TEST_EVEN , std::string("test event message from thread") }; + VE_EMIT(e); + }; + std::thread th(f); + th.detach(); } VE_PUSH_FONT(ICON, 18);