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

32
LINES

< > BotCompany Repo | #1020897 // Loaded Functions (unused)

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (15372L/86K).

1  
!7
2  
3  
concept LoadedFunction {
4  
  S code;
5  
  transient O runnable;
6  
  transient S methodName;
7  
  S providedByModule;
8  
  transient bool loading;
9  
  
10  
  void load() {
11  
    if (runnable != null) ret;
12  
    if (loading) ret;
13  
    loading = true;
14  
    assertIdentifier(code);
15  
    runnable = loadFunctions_cached(code);
16  
    methodName = code;
17  
  }
18  
}
19  
20  
cmodule LoadedFunctions > DynCRUD<LoadedFunction> {
21  
  start {
22  
    thread "Load All Functions" {
23  
      for (LoadedFunction f) f.load();
24  
    }
25  
  }
26  
  
27  
  // API
28  
  
29  
  void loadFunction(S code) {
30  
    uniq_sync(LoadedFunction, +code).load();
31  
  }
32  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1020897
Snippet name: Loaded Functions (unused)
Eternal ID of this version: #1020897/5
Text MD5: 8206c4b9e863b6828f7bf72914fce8d9
Transpilation MD5: 099c25a3fafa2150cd0da2fecd1392d9
Author: stefan
Category: javax
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-13 23:17:35
Source code size: 601 bytes / 32 lines
Pitched / IR pitched: No / No
Views / Downloads: 261 / 816
Version history: 4 change(s)
Referenced in: [show references]