static O quickCache_value; sbool quickCache_set; static Lock quickCache_lock = lock(); static O quickCache(O f) { lock quickCache_lock; if (!quickCache_set) { quickCache_set = true; quickCache_value = callF(f); } ret quickCache_value; }
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: | #1011644 |
Snippet name: | quickCache - singleton cached object per program |
Eternal ID of this version: | #1011644/4 |
Text MD5: | c3ed8ac4934785e24bc551eb94390979 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-01 20:28:46 |
Source code size: | 264 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 467 / 470 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |