Libraryless. Click here for Pure Java version (2852L/18K).
1 | static Thread startThreadRegisteredInCollection(Cl<Thread> collection, S name, Runnable r) { |
2 | if (r == null) null; |
3 | Thread t = newThread(name, r { |
4 | try { |
5 | r.run(); |
6 | } finally { |
7 | remove(collection, currentThread()); |
8 | } |
9 | }); |
10 | add(collection, t); |
11 | startThread(t); |
12 | ret t; |
13 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1029502 |
Snippet name: | startThreadRegisteredInCollection |
Eternal ID of this version: | #1029502/5 |
Text MD5: | 2d8bb327ffecde3cae846c288298b08c |
Transpilation MD5: | 284e0e676cb9e780cac8078963bdfe32 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-08-16 18:35:39 |
Source code size: | 307 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 223 / 334 |
Version history: | 4 change(s) |
Referenced in: | [show references] |