MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / GetThreadInfos

Function GetThreadInfos

src/hx/Debugger.cpp:1020–1047  ·  view source on GitHub ↗

Gets a ThreadInfo for each Thread

Source from the content-addressed store, hash-verified

1018
1019// Gets a ThreadInfo for each Thread
1020static ::Array<Dynamic> GetThreadInfos()
1021{
1022 gMutex.lock();
1023
1024 // Latch the current thread numbers from the current list of call
1025 // stacks.
1026 std::list<int> threadNumbers;
1027 std::list<DebuggerContext *>::iterator stack_iter = gList.begin();
1028 while (stack_iter != gList.end()) {
1029 DebuggerContext *stack = *stack_iter++;
1030 threadNumbers.push_back(stack->mThreadNumber);
1031 }
1032
1033 gMutex.unlock();
1034
1035 ::Array<Dynamic> ret = Array_obj<Dynamic>::__new();
1036
1037 // Now get each thread info
1038 std::list<int>::iterator thread_iter = threadNumbers.begin();
1039 while (thread_iter != threadNumbers.end())
1040 {
1041 Dynamic info = GetThreadInfo(*thread_iter++, false);
1042 if (info != null())
1043 ret->push(info);
1044 }
1045
1046 return ret;
1047}
1048
1049static ::Array<Dynamic> GetStackVariables(int threadNumber,
1050 int stackFrameNumber,

Callers 1

Calls 4

__newFunction · 0.85
GetThreadInfoFunction · 0.85
nullClass · 0.50
pushMethod · 0.45

Tested by

no test coverage detected