1 | static bool atomicFlipVarToTrue(Var<Bool> v) { |
2 | synchronized(v) { |
3 | if (isTrue(v.get())) false; |
4 | v.set(true); true; |
5 | } |
6 | } |
Began life as a copy of #1006169
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: | #1015837 |
Snippet name: | atomicFlipVarToTrue |
Eternal ID of this version: | #1015837/1 |
Text MD5: | d1fd5d3c48ec725b294d689cc1451683 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-28 16:58:21 |
Source code size: | 132 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 319 / 375 |
Referenced in: | [show references] |