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

9
LINES

< > BotCompany Repo | #1035576 // collab_computeLong

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

Libraryless. Click here for Pure Java version (9119L/50K).

1  
static long collab_computeLong(ICollab collab, IF1<LongConsumer, Runnable> work) {
2  
  new Var<Long> var;
3  
  collab.addWork(work.get(result -> {
4  
    var.set(result);
5  
    collab.done();
6  
  }));
7  
  collab.run();
8  
  ret var!;
9  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035576
Snippet name: collab_computeLong
Eternal ID of this version: #1035576/1
Text MD5: 668cdd024ae78d563416444c3cf7ae74
Transpilation MD5: e3a8cee3125a5ced0df2530cd57e7a21
Author: stefan
Category: javax / parallelization
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-06-18 22:52:57
Source code size: 226 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 127 / 174
Referenced in: [show references]