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).

!7

concept LoadedFunction {
  S code;
  transient O runnable;
  transient S methodName;
  S providedByModule;
  transient bool loading;
  
  void load() {
    if (runnable != null) ret;
    if (loading) ret;
    loading = true;
    assertIdentifier(code);
    runnable = loadFunctions_cached(code);
    methodName = code;
  }
}

cmodule LoadedFunctions > DynCRUD<LoadedFunction> {
  start {
    thread "Load All Functions" {
      for (LoadedFunction f) f.load();
    }
  }
  
  // API
  
  void loadFunction(S code) {
    uniq_sync(LoadedFunction, +code).load();
  }
}

download  show line numbers  debug dex   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, 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: 140 / 666
Version history: 4 change(s)
Referenced in: [show references]

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