MCPcopy Create free account
hub / github.com/AGenUI/AGenUI / createThread

Method createThread

core/src/module/agenui_thread_manager.cpp:21–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21bool ThreadManager::createThread(int threadId) {
22 std::lock_guard<std::mutex> lock(_mutex);
23
24 if (_threads.find(threadId) != _threads.end()) {
25 AGENUI_LOG("%d already exists", threadId);
26 return true;
27 }
28
29 std::string name = "AGenUI-" + std::to_string(threadId);
30 // Order: create → start → insert into map
31 IThread *newThread = new MessageThread(name);
32 newThread->start();
33 _threads[threadId] = newThread;
34 AGENUI_LOG("created thread '%s'", name.c_str());
35 return true;
36}
37
38void ThreadManager::destroyThread(int threadId) {
39 AGENUI_LOG("begin destroying thread for %d", threadId);

Callers 1

startMethod · 0.80

Calls 3

endMethod · 0.80
c_strMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected