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

13
LINES

< > BotCompany Repo | #1029659 // syncPopLast - synchronized version of popLast

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2550L/16K).

1  
static <A> A syncPopLast(L<A> l) {
2  
  if (l == null) null;
3  
  synchronized(l) {
4  
    ret popLast(l);
5  
  }
6  
}
7  
8  
static <A> L<A> syncPopLast(int n, L<A> l) {
9  
  if (l == null) null;
10  
  synchronized(l) {
11  
    ret popLast(n, l);
12  
  }
13  
}

Author comment

Began life as a copy of #1002780

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1029659
Snippet name: syncPopLast - synchronized version of popLast
Eternal ID of this version: #1029659/1
Text MD5: 82a6b5a5745d09fc64f0908da31112ea
Transpilation MD5: 94014f1276142b236e9b8bb01248ad21
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-09-05 15:36:24
Source code size: 233 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 156 / 225
Referenced in: [show references]