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

5
LINES

< > BotCompany Repo | #1012933 // tempSetThreadLocal

JavaX fragment (include)

1  
static <A> AutoCloseable tempSetThreadLocal(final ThreadLocal<A> tl, A a) {
2  
  if (tl == null) null;
3  
  final A prev = setThreadLocal(tl, a);
4  
  ret autoCloseable { tl.set(prev); };
5  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney

No comments. add comment

Snippet ID: #1012933
Snippet name: tempSetThreadLocal
Eternal ID of this version: #1012933/5
Text MD5: 93ab61719a552cdfaaaddf94788e9cd6
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-01-03 02:52:38
Source code size: 184 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 480 / 562
Version history: 4 change(s)
Referenced in: [show references]