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

13
LINES

< > BotCompany Repo | #1016334 - cleanDefunctACCsInAllThreads

JavaX fragment (include)

svoid cleanDefunctACCsInAllThreads() {
  for (Thread t : allThreadsWithACC()) pcall {
    AccessControlContext acc = castGetOpt(t, 'inheritedAccessControlContext);
    if (acc == null) continue;
    L<S> defunctIDs = acc_defunctProgramIDs(acc);
    if (nempty(defunctIDs)) {
      S desc = threadGroupName(t) + " / " + t.getName();
      //print("DEFUNCT ACC IN THREAD! Cleaning. " + defunctIDs + ": " + desc);
      set(t, inheritedAccessControlContext := acc_current());
      //print("CLEANED.");
    }
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1016334
Snippet name: cleanDefunctACCsInAllThreads
Eternal ID of this version: #1016334/2
Text MD5: b1edd7d55e5578217ef50bb231178d43
Author: stefan
Category: javax / maintenance
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-29 16:20:07
Source code size: 523 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 320 / 357
Version history: 1 change(s)
Referenced in: [show references]

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