Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

15
LINES

< > BotCompany Repo | #1002465 // Test synchronizing properly on synchroList

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (636L/5K/15K).

!752

p {
  L l = synchroList(litlist("hello"));
  
  synchronized(get(l, "mutex")) {
    print("This is the safe clone: " + structure(new ArrayList(l)));
  }
  
  // Test getOpt("mutex")
  
  O mutex = getOpt(l, "mutex");
  print("Mutex: " + mutex);
  assertTrue(l == mutex);
}

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: 583 / 597
Referenced in: [show references]