Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

21
LINES

< > BotCompany Repo | #1003445 // swingAndWait - (almost) same as invokeAndWait

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (9649L) is out of date.

static void swingAndWait(Runnable r) ctex {
  if (isAWTThread())
    r.run();
  else {
    r = addThreadInfoToRunnable(r);
    executingSwingCode(r);
    EventQueue.invokeAndWait(r);
  }
}

static O swingAndWait(O f) {
  if (isAWTThread())
    ret callF(f);
  else {
    new Var result;
    swingAndWait(r {
      result.set(callF(f));
    });
    ret result!;
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 25 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, ekrmjmnbrukm, elmgxqgtpvxh, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, onxytkatvevr, podlckwnjdmb, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, uelavcdoioby, vouqrxazstgt, whxojlpjdney, wtqryiryparv, xrpafgyirdlv, yanjaxplzisb

No comments. add comment

Snippet ID: #1003445
Snippet name: swingAndWait - (almost) same as invokeAndWait
Eternal ID of this version: #1003445/4
Text MD5: b23c1c785e8dfcdaff78b2ff538821e0
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-11-26 18:11:20
Source code size: 386 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 723 / 1777
Version history: 3 change(s)
Referenced in: [show references]