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

14
LINES

< > BotCompany Repo | #1028804 // Test ReliableSingleThread cancelling (seems to work, second thread waits for first one to finish)

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

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

1  
!7
2  
3  
cprint {
4  
  start-thread {
5  
    ReliableSingleThread rst = dm_rst(r {
6  
      printWithMS("rst thread " + currentThreadID());
7  
      busySleepSeconds_noPing(1);
8  
      printWithMS("rst thread " + currentThreadID() + " done");
9  
    });
10  
    rst.go();
11  
    sleepSeconds(0.5);
12  
    rst.cancelAndTrigger();
13  
  }
14  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1028804
Snippet name: Test ReliableSingleThread cancelling (seems to work, second thread waits for first one to finish)
Eternal ID of this version: #1028804/4
Text MD5: 5ea30d609b3f57d811cfaf19b14b9d31
Transpilation MD5: 29d3fed00a90843d950d9b2a1c248c07
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-09 10:49:34
Source code size: 315 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 178 / 275
Version history: 3 change(s)
Referenced in: [show references]