Libraryless. Click here for Pure Java version (3044L/19K).
1 | svoid dm_action(fS desc, final Runnable r, O... _) { |
2 | optPar bool printName = true; |
3 | if (printName) print(desc); |
4 | runInterruptibly(voidfunc(final Runnable interrupt) { |
5 | temp AutoCloseable action = dm_currentAction(desc, |
6 | r { print("INTERRUPTED"); callF(interrupt) }); |
7 | callF(r); |
8 | }); |
9 | } |
10 | |
11 | svoid dm_action(Runnable r) { |
12 | dm_action(str(r), r); |
13 | } |
download show line numbers debug dex old transpilations
Travelled to 10 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1019892 |
Snippet name: | dm_action - run action & allow user to cancel (by cancelling the thread). runs action in new thread |
Eternal ID of this version: | #1019892/6 |
Text MD5: | cd7f99d225be1742b20cad01c5d3747a |
Transpilation MD5: | b434e23901da464bf1b7207558e5878f |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-08-13 15:09:15 |
Source code size: | 369 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 429 / 568 |
Version history: | 5 change(s) |
Referenced in: | [show references] |