1 | static <A> AutoCloseable temporarilySetThreadLocal(final ThreadLocal<A> tl, A value) { |
2 | final A oldValue = setThreadLocal(tl, value); |
3 | ret new AutoCloseable { |
4 | public void close() { |
5 | tl.set(oldValue); |
6 | } |
7 | }; |
8 | } |
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: | #1012424 |
Snippet name: | temporarilySetThreadLocal - returns an AutoCloseable |
Eternal ID of this version: | #1012424/2 |
Text MD5: | e80e312466145f8a115466cd25c294b5 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-02 17:33:12 |
Source code size: | 230 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 405 / 430 |
Version history: | 1 change(s) |
Referenced in: | [show references] |