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

5
LINES

< > BotCompany Repo | #1031596 // runInQ - if we arenot in queue thread, add runnable to queue. don't wait until done. if in queue thread, run immediately

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

Libraryless. Click here for Pure Java version (3774L/22K).

svoid runInQ(Q q, Runnable r) {
  if (r == null) ret;
  if (isInQ(q)) ret with callF(r);
  q.add(r);
}

Author comment

Began life as a copy of #1020593

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031596
Snippet name: runInQ - if we arenot in queue thread, add runnable to queue. don't wait until done. if in queue thread, run immediately
Eternal ID of this version: #1031596/1
Text MD5: 32d83ae89d911405c813078c34cdb9b6
Transpilation MD5: bc0c73b88a29026a83a4605a662e8a20
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:32:51
Source code size: 106 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 159 / 220
Referenced in: [show references]