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

15
LINES

< > BotCompany Repo | #1008274 // _registerThread - register a thread as belonging to this program

JavaX fragment (include)

1  
static Map<Thread, Bool> _registerThread_threads;
2  
static O _onRegisterThread; // voidfunc(Thread)
3  
4  
static Thread _registerThread(Thread t) {
5  
  if (_registerThread_threads == null)
6  
    _registerThread_threads = newWeakHashMap();
7  
  _registerThread_threads.put(t, true);
8  
  vm_generalWeakSubMap("thread2mc").put(t, weakRef(mc()));
9  
  callF(_onRegisterThread, t);
10  
  ret t;
11  
}
12  
13  
static void _registerThread() {
14  
  _registerThread(Thread.currentThread());
15  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 18 computer(s): aoiabmzegqzx, ayfdnjdhpjha, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, jtubtzbbkimh, kltaiputbqfu, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1008274
Snippet name: _registerThread - register a thread as belonging to this program
Eternal ID of this version: #1008274/14
Text MD5: e8836d506b1b014f74b168664dfb3f43
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-27 01:29:49
Source code size: 460 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 566 / 663
Version history: 13 change(s)
Referenced in: [show references]