Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1009353 // interruptDeadlockedThreads

JavaX fragment (include)

static void interruptDeadlockedThreads(L<ThreadInfo> lockingThreads) {
  if (empty(lockingThreads)) ret;
  L<Thread> threads = threadInfosToThreads(lockingThreads);
  if (empty(threads)) ret;
  Thread t = random(threads);
  print("Interrupting deadlocked thread " + quote(t.getName()) + " (out of " + l(lockingThreads) + ")");
  t.interrupt();
}

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: #1009353
Snippet name: interruptDeadlockedThreads
Eternal ID of this version: #1009353/1
Text MD5: 8ecd178b16196b1f1f1249d6ab7980b1
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-07-24 16:55:33
Source code size: 352 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 527 / 515
Referenced in: [show references]