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

4
LINES

< > BotCompany Repo | #1021672 // setThreadLocalAndReturn - returns new value

JavaX fragment (include)

1  
static <A> A setThreadLocalAndReturn(ThreadLocal<A> tl, A value) {
2  
  if (tl != null) tl.set(value);
3  
  ret value;
4  
}

Author comment

Began life as a copy of #1011580

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1021672
Snippet name: setThreadLocalAndReturn - returns new value
Eternal ID of this version: #1021672/1
Text MD5: e3e95781ab248858e131587b6459c063
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-24 00:04:31
Source code size: 117 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 293 / 318
Referenced in: [show references]