add thread test
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user