Libraryless. Click here for Pure Java version (2174L/14K).
1 | static <A, B extends A> ThreadLocal<A> nuLike initializedThreadLocal(Class<B> c) { |
2 | ret initializedThreadLocal(() -> nuInstance(c)); |
3 | } |
4 | |
5 | static <A> ThreadLocal<A> nuLike initializedThreadLocal(IF0<A> f) { |
6 | ret new ThreadLocal<A>() { |
7 | public A initialValue() { |
8 | ret callF(f); |
9 | } |
10 | }; |
11 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1012803 |
Snippet name: | initializedThreadLocal - takes a Class object; makes an instance for every thread |
Eternal ID of this version: | #1012803/6 |
Text MD5: | e87601719014250b51ab194daf351f38 |
Transpilation MD5: | d5e23c0fbd6a1e3c476352d20063a0a4 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-01-04 17:57:13 |
Source code size: | 306 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 386 / 494 |
Version history: | 5 change(s) |
Referenced in: | [show references] |