Libraryless. Click here for Pure Java version (4532L/25K).
1 | svoid cancelThread(Thread t) { |
2 | if (t == null) ret; |
3 | ping(); |
4 | ifndef LeanMode |
5 | |
6 | ifdef PingV3 |
7 | var ps = pingSource(t); |
8 | if (ps == null) |
9 | warn("No ping source for thread " + t + ", can't cancel"); |
10 | else |
11 | ps.cancel(); |
12 | endifdef |
13 | |
14 | ifndef PingV3 |
15 | synchronized(ping_actions) { |
16 | ping_actions.put(t, "cancelled"); |
17 | ping_anyActions = true; |
18 | } |
19 | endifndef |
20 | |
21 | endifndef |
22 | } |
download show line numbers debug dex old transpilations
Travelled to 17 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1004549 |
Snippet name: | cancelThread - cancel thread through ping() |
Eternal ID of this version: | #1004549/12 |
Text MD5: | 645ceb73b43ba3a5324aa8fde3cada2c |
Transpilation MD5: | 7528071d0c17700e7da25e1edddacd0e |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-11-02 00:05:25 |
Source code size: | 428 bytes / 22 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 725 / 849 |
Version history: | 11 change(s) |
Referenced in: | [show references] |