Threading for WebSocket #3919
xarthurx
announced in
Old/Archived discussions
Replies: 1 comment 1 reply
-
Here, imgui wouldn't really have any sort of interaction with your threaded code. Your C/C++ code is responsible for being the threadsafe one. Something like this: if (ImGui::Button("Start Server")) {
threadSafeEventStartServer();
}
ImGui::SameLine();
if (ImGui::Button("Stop Server")) {
threadSafeEventStopServer();
} You are responsible for writing |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've read multiple issues relating to threading for non-OpenGL process but am still not very clear if
imgui
can do this or not.So sorry for the spam here.
Need:
In my UI, I have two buttons:
startServer
andstopServer
, which will start/stop a WebSocket Server.The Server will receive data from time to time and send things back after processing the data.
The main UI can be blocked or not blocked after starting the Server, but I would like to have the functionality to press
stopServer
.Meanwhile, after I press the
startServer
, the main UI is frozen after the WebSockets started.From what I understand, I need to put it in another thread.
But does
imgui
allows this? I'm not vary familiar with GUI and would like to know if the instant gui (imgui
) can do this.Beta Was this translation helpful? Give feedback.
All reactions