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

13
LINES

< > BotCompany Repo | #1001444 // List all non-daemon threads

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (47L/1K/2K).

!747

m {
  p {
    Map<Thread, StackTraceElement[]> threadMap = Thread.getAllStackTraces();
    for (Thread t : threadMap.keySet()) {
      if (t.isDaemon()) continue;
      //print(structure(threadMap));
      print(t);
    }
    print(threadMap.size() + " threads.");
  }
}

Author comment

Began life as a copy of #1000948

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1001444
Snippet name: List all non-daemon threads
Eternal ID of this version: #1001444/1
Text MD5: 93ce0d9b93ed9c7ec99db695c08c5246
Transpilation MD5: facf212ecc54fb5ba014fc7bd6b89bb3
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-10-16 17:10:39
Source code size: 288 bytes / 13 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 581 / 623
Referenced in: [show references]