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

6
LINES

< > BotCompany Repo | #1029661 // syncLast - synchronized version of last

JavaX fragment (include)

static <A> A syncLast(L<A> l) {
  if (l == null) null;
  synchronized(l) {
    ret last(l);
  }
}

Author comment

Began life as a copy of #1029659

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: #1029661
Snippet name: syncLast - synchronized version of last
Eternal ID of this version: #1029661/1
Text MD5: dae948023e2959b72040ed3c0b4bd8b4
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-09-05 16:45:00
Source code size: 102 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 152 / 188
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1030658 - syncNextToLast - synchronized version of nextToLast