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

8
LINES

< > BotCompany Repo | #1025796 // dm_prepareMakeAndCallInThread - pass module/OS reference to functions called with makeAndCall

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

Libraryless. Click here for Pure Java version (12689L/85K).

svoid dm_prepareMakeAndCallInThread() {
  O module = dm_current_generic(); // dm_current_mandatory_generic();
  if (module != null) makeAndCall_setInitInThread(func(Class c) -> AutoCloseable {
    shareMyCreatorWith(c);
    x30_pkg.x30_util.BetterThreadLocal<WeakReference> tl = cast callOpt(c, "dm_current_generic_tl");
    ret tempSetTL(tl, weakRef(module));
  });
}

Author comment

Began life as a copy of #1019609

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025796
Snippet name: dm_prepareMakeAndCallInThread - pass module/OS reference to functions called with makeAndCall
Eternal ID of this version: #1025796/7
Text MD5: 1331b2acd7684f84617bff629e15a00f
Transpilation MD5: 9eaefc2b213971689c64a8f98d4a5871
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-27 00:12:14
Source code size: 375 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 201 / 292
Version history: 6 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)