DEV Community

Discussion on: Who's looking for open source contributors? (Jan 21st edition)

Collapse
 
vsilaev profile image
Valery Silaev • Edited

I'm building a library that simplifies asynchronous programming with Java - Tascalate Concurrent. Inside you can find CompletionStage implementation for blocking and/or I/O-bound tasks (while the standard CompletableFuture is unsuitable for this); retry/poll functionality; extended operations to work with timeouts/delay and many other useful utilities.

Though I'm testing the library myself "in the wild" (several commercial projects where it's pretty intensively used), I would like to have a feedback from the community to make the library better.

vsilaev / tascalate-concurrent

Implementation of blocking (IO-Bound) cancellable java.util.concurrent.CompletionStage and related extensions to java.util.concurrent.ExecutorService-s

Maven Central GitHub release license

tascalate-concurrent

The library provides an implementation of the CompletionStage interface and related classes these are designed to support long-running blocking tasks (typically, I/O bound). This functionality augments the sole Java 8 built-in implementation, CompletableFuture, that is primarily supports computational tasks. Also, the library helps with numerous asynchronous programing challenges like handling timeouts, retry/poll functionality, orchestrating results of multiple concurrent computations and similar.

Since the version 0.7.0 the library is shipped as a multi-release JAR and may be used both with Java 8 as a classpath library or with Java 9+ as a module.

Why a CompletableFuture is not enough?

There are several shortcomings associated with CompletableFuture implementation that complicate its usage for real-life asynchronous programming, especially when you have to work with I/O-bound interruptible tasks:

  1. CompletableFuture.cancel() method does not interrupt underlying thread; it merely puts future to exceptionally completed state. So even if you use any blocking calls inside…