Download Jar. Libraryless. Click here for Pure Java version (4370L/31K).
1 | !7 |
2 | |
3 | static new InheritableThreadLocal<S> tl; |
4 | |
5 | p {
|
6 | thread {
|
7 | tl.set("thread1");
|
8 | assertEqualsVerbose("thread1", tl!);
|
9 | thread {
|
10 | assertEqualsVerbose("thread1", tl!);
|
11 | } |
12 | } |
13 | |
14 | thread {
|
15 | assertEqualsVerbose(null, tl!); |
16 | } |
17 | |
18 | sleepSeconds(1); // Too lazy to join threads |
19 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1015954 |
| Snippet name: | Test InheritableThreadLocal (OK) |
| Eternal ID of this version: | #1015954/3 |
| Text MD5: | 5aae4203d9ebdad1b76a4f395fa2e868 |
| Transpilation MD5: | 408336e2f9e762b6e8657ac8d6300b3b |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX source code (desktop) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-05-31 22:14:19 |
| Source code size: | 316 bytes / 19 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 775 / 1773 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |