Libraryless. Click here for Pure Java version (636L/5K/15K).
1 | !752 |
2 | |
3 | p { |
4 | L l = synchroList(litlist("hello")); |
5 | |
6 | synchronized(get(l, "mutex")) { |
7 | print("This is the safe clone: " + structure(new ArrayList(l))); |
8 | } |
9 | |
10 | // Test getOpt("mutex") |
11 | |
12 | O mutex = getOpt(l, "mutex"); |
13 | print("Mutex: " + mutex); |
14 | assertTrue(l == mutex); |
15 | } |
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: | #1002465 |
Snippet name: | Test synchronizing properly on synchroList |
Eternal ID of this version: | #1002465/1 |
Text MD5: | 397fea984c7c285ef357fa45949d6ffc |
Transpilation MD5: | 53184875210f2956776da87c539cf454 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-01-24 19:58:29 |
Source code size: | 292 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 662 / 690 |
Referenced in: | [show references] |