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

18
LINES

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

JavaX fragment (include)

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

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

download  show line numbers  debug dex   

Travelled to 19 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, podlckwnjdmb, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, whxojlpjdney, wtqryiryparv, xrpafgyirdlv, yanjaxplzisb

No comments. add comment

Snippet ID: #1003445
Snippet name: swingAndWait - (almost) same as invokeAndWait
Eternal ID of this version: #1003445/2
Text MD5: 0fa1a28f96d24c727daadb73e113202e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-26 14:23:36
Source code size: 356 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 348 / 1013
Version history: 1 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1003445 & http://1003445.tinybrain.de