Transpiled version (3679L) is out of date.
1 | svoid runInQAndWait(Q q, Runnable r) { |
2 | if (r == null) ret; |
3 | if (isInQ(q)) ret with callF(r); |
4 | |
5 | final new Flag done; |
6 | final new Var<Throwable> error; |
7 | |
8 | q.add(r { |
9 | try { |
10 | callF(r); |
11 | } catch e { |
12 | error.set(e); |
13 | } finally { |
14 | done.raise(); |
15 | } |
16 | }); |
17 | |
18 | done.waitUntilUp(); |
19 | if (error.has()) throw rethrow(error!); |
20 | } |
Began life as a copy of #1019896
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1020593 |
Snippet name: | runInQAndWait - run in a queue, wait until done. run immediately if called from within queue |
Eternal ID of this version: | #1020593/7 |
Text MD5: | 1f36c8322889dce226067807ef2d38ce |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-06-22 08:29:20 |
Source code size: | 368 bytes / 20 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 361 / 468 |
Version history: | 6 change(s) |
Referenced in: | [show references] |