Transpiled version (112L) is out of date.
sclass Flag is Runnable { private volatile boolean up; /** returns true if flag was down before (i.e. flag was actually raised right now) */ public bool raise() { if (up) false; synchronized { if (up) false; up = true; notifyAll(); true; } } run { raise(); } public void waitUntilUp() ctex { if (up) ret; synchronized { while (!up) wait(); } } public bool waitUntilUp(double timeout) { if (timeout == infinity()) { waitUntilUp(); ret isUp(); } else ret waitUntilUp(toMS(timeout)); } public bool waitUntilUp(long timeout) ctex { if (up) ret true; synchronized { if (!up) wait(timeout); } ret isUp(); } public bool isUp aka get() { ret up; } toString { ret isUp() ? "up" : "down"; } }
Began life as a copy of #1000782
download show line numbers debug dex old transpilations
Travelled to 24 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, fehiwqupcyrn, gwrvuhgaqvyk, imzmzdywqqli, ishqpsrjomds, jtubtzbbkimh, lhdilzshxjzv, lpdgvwnxivlt, lulzaavyztxj, mqqgnosmbjvj, onxytkatvevr, ppjhyzlbdabe, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt, wtqryiryparv, xrpafgyirdlv
No comments. add comment