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

29
LINES

< > BotCompany Repo | #1027866 // Stage - some stage in a process

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2505L/16K).

1  
sclass Stage implements Runnable {
2  
  S name;
3  
  bool done;
4  
  O result;
5  
  PersistableThrowable error;
6  
  //long started, done; // timestamps
7  
  //S log;
8  
  IF0 code;
9  
  
10  
  sS _fieldOrder = "name done result";
11  
  
12  
  *() {}
13  
  *(S *name) {}
14  
  *(S *name, IF0 *code) {}
15  
  
16  
  event computed;
17  
  
18  
  run {
19  
    if (done || code == null) ret;
20  
    try {
21  
      result = code!;
22  
      computed();
23  
    } catch print e {
24  
      error = persistableThrowable(e);
25  
    } finally {
26  
      done = true;
27  
    }
28  
  }
29  
}

Author comment

Began life as a copy of #1027106

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: #1027866
Snippet name: Stage - some stage in a process
Eternal ID of this version: #1027866/7
Text MD5: f52b92d0e303c550ff10044c688b7d97
Transpilation MD5: 36b67a2be4f1a48a38e594e3a1682dc4
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-04-16 13:25:01
Source code size: 510 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 273 / 625
Version history: 6 change(s)
Referenced in: [show references]