Releases: vsilaev/tascalate-concurrent
Releases · vsilaev/tascalate-concurrent
Tascalate Concurrent 0.9.0
This release adds several major features as long as refactorings of the existing API (so it has some breaking changes):
- Revisit and refactor
Promise.raw()functionality and introducingPromise.unwrap()(single-level undecoration) in addition toPromise.raw()(full undecoration); fixing all related code to useunwrapin favor ofraw. - Adding new operators to
Promise-thenFilterandthenFilterAsync - Adding missing
Thread/Executor-related stuff:TaskCompletionService,TreadFactoryBuilder,ThreadGroupBuilderand alike. - Revisiting
ContextVarand related context-aware functionality: shifting responsibilities, introducingContextTrampoline, provide an option to create contex-awareExecutor-s in addition to context-awarePromise-s. - Adding asynchronous version of
try-with-resourcefunctionality toPromisesthat supports both synchronously closeable resources (std.AutoClosable) and asynchronously closeable resources (implementing library-specificAsyncCloseable). - Adding
AsyncCompletionsclass that provides an option to iterate / stream over completedPromise-s results (loaded by batches). - Providing an option to partitioned collections processing with
Promises.partitioned. - Introduce
PromiseOperationsclass that exposes utility methods for convenient decoration ofPromise-s viaPromise.as(decorator)operation. - Adding
Promises.loopto provide asynchronous function-style equivalent of Java loops (likefor/while/do-while). - Refactor retry functionality (fix corner cases, simplifying code using asynchronous loop).
- Complement
all/any[Strict]/atLeast[Strict]/ with overloaded methods that accepts and returns keyed collections (java.util.Map) in addition to indexed collections.
Tascalate Concurrent 0.8.4
Minor release with the following changes:
- Fix bug in default
DelayPolicy.withMinDelay(...)metod -- erroneously delegates towithMaxDelay. - Remove rarely used internal helper classes to minimize library size.
Tascalate Concurrent 0.8.3
The following changes are done:
- Fixed error with unimplemented methods for children of
AbstractPromiseDecorator(sic!) - Avoid async operations with
exceptionallyAsync/exceptionallyComposeAsyncwhen no exception produced. - Simplify
Promisedefault methods logic via delegation toDependentPromise(it's used anyway) -- reduces code duplication. - Remove non-api methods from
Promisesclass. - Introducing
Promise.onCanceloperator -- execute custom code block when promise is cancelled (directly, or as dependent promise or via timeout)
Tascalate Concurrent 0.8.2
The following changes is done:
- Adding new Java 12
CompletionStageAPI methods:exceptionallyAsync,composeExceptionally,composeExceptionallyAsync. - Adding meaningful stack trace to
MultitargetException(includes stack traces of child exceptions).
Tascalate Concurrent 0.8.1
The following changes are made since 0.8.0
- Fixed timeout handling in
Promises.retry*- previously only timeout set was cancellable, not the original promise. - Fixed error in
RetryPolicythat prevents creating infinite retry operations. - Revisited decorators hierarchy
- Fix numerous bugs in decorators (enlistOptions are not passed for dependent promise decorator; wrong behavior for defaultAsyncOn / dependent decorators)
- Introduced
ContextVar-- now it's possible to relay contextual variables (ThreadLocal-s) to composition operations onPromise-s
Tascalate Concurrent 0.8.0
The following changes are made since 0.7.1
- Fixed exceptional completion handling in
Promise.orTimeoutandPromise.onTimeoutoperations - The artifact was renamed to align naming across other Tascalate projects
IMPORTANT!
From version 0.8.0 please use the following artifact name:
<dependency>
<groupId>net.tascalate</groupId>
<artifactId>net.tascalate.concurrent</artifactId>
<version>0.8.0</version>
</dependency>The old naming was:
<dependency>
<groupId>net.tascalate.concurrent</groupId>
<artifactId>net.tascalate.concurrent.lib</artifactId>
<version>0.7.1</version>
</dependency>Tascalate Concurrent 0.7.1
Minor enhancements:
- Decorators returned from
Promise.defaultAsyncOn(executor)now avoids nesting decoration ondefaultAsyncOn - The result of
Promises.retrywithExecutorargument (i.e. all methods exceptPromises.retryFuture) now has a default asynchronousExecutorset to the parameter.
Tascalate Concurrent 0.7.0 (Java 9+ support / Promises.retry refactoring)
The release contains both important bug fixing and important refactorings:
- Promise.orTimeout was fixed (previously no cancellation on timeout)
- Promise.delay was fixed (previously no delay on error)
- The
Executorused after timeout methods now is always the default asynchronous executor of the originalPromise(previously this requirement was not hold in some cases). Promises.retry*andPromises.poll*functionality has been fully revisited -- now onlyretryis left and it's a responsibility ofRetryPolicyto define what result is valid (hence more flexible options besides just non-nullare possible);RetryPolicy/DelayPolicy/RetryContextwas intensively revisited and are not compatible with previous version.CompletableTask.submitmethod is added to allow submitting aCallable-- i.e. a lambda that throws any exception.- Now library is created as a multi-release JAR and may be used with Java 8 as regular classpath library or with Java 9+ as a module
Bug fixing release
- Fixes "hanged" promises when Executor.execute throws RejectedExecutionException.
- Internal code refactorings and simplifications (within
AbstractCompletableTaskhierarchy)
Bug fixing release
Fix exception handling in AbstractCompletableTask.whenCompleteAsync