Skip to content

dev-priyanshujain/java-node-style-concurrency-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Node-Style Concurrency Library

Maven Central License: MIT Java 17+

A lightweight, zero-dependency Java library that brings Node.js-style async patterns to the JVM — promises, timers, event emitters, cancellation, and more.

Installation

Add the following dependency to your pom.xml:

<dependency>
    <groupId>io.github.dev-priyanshujain</groupId>
    <artifactId>java-node-style-concurrency-lib</artifactId>
    <version>0.1.0</version>
</dependency>

For Gradle (Groovy):

implementation 'io.github.dev-priyanshujain:java-node-style-concurrency-lib:0.1.0'

Features

  • Promise<T>then, catchError, finallyDo, thenAsync; static resolve, reject, all, allSettled, race, any
  • AsyncsetTimeout, setInterval, setImmediate, nextTick
  • AbortController / AbortSignal — cancellation for timers and promises
  • EventEmitter — named events with on, once, off, emit
  • WorkerPool — run blocking or async tasks on a thread pool, get Promises back
  • PromiseDiagnostics — unhandled rejection handlers and debug logging
  • CompletableFuture interopfromFuture / toFuture for seamless integration

Documentation

Usage Guide — detailed examples and API reference.

Building

Requirements: Java 17+, Maven 3.8+

# Run tests
mvn test

# Build the JAR
mvn package

License

This project is licensed under the MIT License — see the LICENSE file for details.

About

A library to use NodeJs style concurrency in Java

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages