1 | static S deadlockedThreadsToString(L<ThreadInfo> threadInfo) { |
2 | new L<S> out; |
3 | int i = 0; |
4 | Map<ThreadInfo, Thread> map = threadInfosToThreads_map(threadInfo); |
5 | for (ThreadInfo threadInfo1 : threadInfo) { |
6 | out.add("Thread " + (++i) + "/" + l(threadInfo) + ": ID=" + threadInfo1.getThreadId() |
7 | + ", name=" + quote(threadInfo1.getThreadName())); |
8 | out.add(" Trying to lock: " + threadInfo1.getLockName() |
9 | + " which is owned by thread " + threadInfo1.getLockOwnerId() |
10 | + " (" + quote(threadInfo1.getLockOwnerName()) + ")"); |
11 | // ThreadInfo.getStackTrace() doesn't work, so we look up the thread. |
12 | Thread t = map.get(threadInfo1); |
13 | if (t != null) { |
14 | StackTraceElement[] st = t.getStackTrace(); |
15 | out.add("Stack trace (" + l(st) + "): "); |
16 | out.add(indentx(stackTraceToString(st))); |
17 | } |
18 | } |
19 | ret lines(out); |
20 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1009307 |
Snippet name: | deadlockedThreadsToString |
Eternal ID of this version: | #1009307/10 |
Text MD5: | ae130209323208189e1782b73f19f6ec |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-07-23 02:17:41 |
Source code size: | 871 bytes / 20 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 515 / 539 |
Version history: | 9 change(s) |
Referenced in: | [show references] |