Libraryless. Click here for Pure Java version (1528L/10K/34K).
1 | !7 |
2 | |
3 | p { |
4 | cleanUp_interruptThreads = true; |
5 | assertEquals(ll(currentThread()), registeredThreads()); |
6 | |
7 | // invoke & run module |
8 | O o = runInSemiNewThread(#1008275); |
9 | |
10 | // count threads |
11 | sleep(500); |
12 | print(l(registeredThreads(o))); |
13 | while (l(registeredThreads(o)) < 3) sleep(10); |
14 | assertEquals(3, l(registeredThreads(o))); |
15 | |
16 | // clean up |
17 | cleanUp(o); |
18 | |
19 | // see threads disappear |
20 | sleep(500); |
21 | print(l(registeredThreads(o))); |
22 | print("Waiting for GC..."); |
23 | gc(); |
24 | while (l(registeredThreads(o)) > 0) sleep(10); |
25 | |
26 | assertEquals(1, l(registeredThreads())); |
27 | print("OK!"); |
28 | } |
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: | #1008280 |
Snippet name: | Test cleanUp on sleeping threads, including main thread [WORKS] |
Eternal ID of this version: | #1008280/15 |
Text MD5: | b2e96a9fdc8510fe1fd38d26b7dc5b4f |
Transpilation MD5: | 45fcb4ea7ce20dfacb6fa9ea17777f22 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-05-06 23:18:37 |
Source code size: | 616 bytes / 28 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 513 / 656 |
Version history: | 14 change(s) |
Referenced in: | [show references] |