Skip to content

Latest commit

 

History

History
88 lines (44 loc) · 2.25 KB

readme.md

File metadata and controls

88 lines (44 loc) · 2.25 KB

Asyncc.java

High-quality port of async.js to Java.
Primarily for use with Vert.x.
Uses async primitives (error-first callbacks), for performance and genericism.

Adds nice structure to callback-passing-style codebases.

Complete Documentation:

https://async-java.github.io/org/ores/async/Asyncc.html#method.summary

Installation with Maven

Simple example:

import org.ores.async.Asyncc;

public void retrieveValue(){
  Asyncc.Parallel(t -> t.done(null,"foo"), (err, results) -> {
    
    
  });  
}

Utility Methods

Links to the documentation

Control Flow

Map/Filter/Reduce/Each

Queue / Priority Queue

Locking

(Because the synchronized keyword blocks).

Improvements and Quality

This library improves upon async.js. For those familiar, this library makes these improvements:

  1. Composability. This is available because Java has method overloading and JS doesn't.

In JS:

With Java:

  1. async.waterfall is considered harmful. We use a ma

  2. We have a shortCircuited boolean available to check if we can end early.