A lightweight, zero-dependency Java library that brings Node.js-style async patterns to the JVM — promises, timers, event emitters, cancellation, and more.
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'- Promise<T> —
then,catchError,finallyDo,thenAsync; staticresolve,reject,all,allSettled,race,any - Async —
setTimeout,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 interop —
fromFuture/toFuturefor seamless integration
Usage Guide — detailed examples and API reference.
Requirements: Java 17+, Maven 3.8+
# Run tests
mvn test
# Build the JAR
mvn packageThis project is licensed under the MIT License — see the LICENSE file for details.