Gets the attached threads.
()
| 10554 | } |
| 10555 | /** Gets the attached threads. */ |
| 10556 | static get attachedThreads() { |
| 10557 | if (Il2Cpp.currentThread == null) { |
| 10558 | (0, console_1.raise)("only Il2Cpp threads can invoke Il2Cpp.attachedThreads"); |
| 10559 | } |
| 10560 | const array = []; |
| 10561 | const sizePointer = Memory.alloc(Process.pointerSize); |
| 10562 | const startPointer = Il2Cpp.Api._threadGetAllAttachedThreads(sizePointer); |
| 10563 | const size = sizePointer.readInt(); |
| 10564 | for (let i = 0; i < size; i++) { |
| 10565 | array.push(new Il2Cpp.Thread(startPointer.add(i * Process.pointerSize).readPointer())); |
| 10566 | } |
| 10567 | return array; |
| 10568 | } |
| 10569 | /** Gets the current attached thread, if any. */ |
| 10570 | static get currentThread() { |
| 10571 | const handle = Il2Cpp.Api._threadCurrent(); |
nothing calls this directly
no test coverage detected