1 | static Var<java.util.Timer> startDeadlockDetector_timer = new Var; |
2 | static int startDeadlockDetector_interval; |
3 | static bool startDeadlockDetector_noStop; // don't stop when deadlock found |
4 | |
5 | static void startDeadlockDetector() { |
6 | synchronized(startDeadlockDetector_timer) { |
7 | if (startDeadlockDetector_timer! == null) |
8 | startDeadlockDetector_timer.set(doEvery_daemon(1000, func { |
9 | if (empty(printDeadlocks())) null; |
10 | if (startDeadlockDetector_noStop) { print("Stopping deadlock detector."); false; } |
11 | null; |
12 | })); |
13 | } |
14 | } |
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: | #1009293 |
Snippet name: | startDeadlockDetector - starts a thread that checks for deadlocks regularly; cancels when first deadlock found |
Eternal ID of this version: | #1009293/7 |
Text MD5: | b093739c29dec4ef0df18f70edbe1356 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-07-23 15:20:12 |
Source code size: | 560 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 514 / 534 |
Version history: | 6 change(s) |
Referenced in: | [show references] |