Skip to content

Releases: vsilaev/tascalate-concurrent

Tascalate Concurrent 0.9.8

20 Apr 14:32
Compare
Choose a tag to compare

Fix Cancel methods cache (don't prevent classes from being garbage collected, avoid double-lookups of methods due to broken concurrency)

Tascalate Concurrent 0.9.7

25 Aug 17:53
Compare
Choose a tag to compare

Relax type restrictions in Promises.partitioned and PromiseOperations.partitioned*** -- the source entries' type and the spawner-s return value type may be different.

Tascalate Concurrent 0.9.6

28 Jul 15:52
Compare
Choose a tag to compare
  • Refactoring promise customizers for context vars and blocking io
  • Fixing errors with NIO classes in net.tascalate.concurrent.io

Tascalate Concurrent 0.9.5

23 Feb 10:31
Compare
Choose a tag to compare

Adding net.tascalate.concurrent.io package with the following functionality:

  1. Drop-in replacement for java.nio.channels.AsynchronousChannel implementations like AsynchronousFileChannel, AsynchronousServerSocketChannel, AsynchronousSocketChannel.
  2. BlockingIO class that helps create interruptible code that uses blocking java.io.InputStream, java.io.OutputStream, java.net.HttpUrlConnection and alike.

Tascalate Concurrent 0.9.4

01 Nov 22:50
Compare
Choose a tag to compare

Minor release with the following changes:

  1. Fix issue Unexpected cancellation behavior - now onTimeout / orTimeout methods with cancelOnTimeout = true correctly and timely cancels Promise even when used with Executor having limited number of free threads (even in case of single-thread executor). However, the behavior may still be surprising for cancelOnTimeout = false case, while we always have to switch back to to the original Executor after timeout (and if it has no free threads, then switching thread context is impossible).
  2. Simplified CallbackRegistry and related code in AbstractCompletableTask.
  3. Fix error propagation in CompletablePromise, fix cancellation of completeAsync result (should not complete the CompletablePromise).

Tascalate Concurrent 0.9.3

20 Oct 23:03
Compare
Choose a tag to compare

This minor update has the following changes:

  1. Simplified Promise.onCancel implementation (no need for internal extra classes, just std. whenComplete handler is enough)
  2. MultitargetException now behaves as a standard Java exception (causes are no stored as Exception.cause and Exception.suppressedExceptions; Exception.message provides meaningful explanation; stack traces works correctly)
  3. Fixed currentStage cancellation in AsyncLoop
  4. Other minor fixes and refactorings (PromiseAdapterExtended superclass; simplify dependencies between AbstractCompletableTask and subclasses; move responsibilities between Timeouts and PromiseHelper etc)

Tascalate Concurrent 0.9.2

21 Sep 20:46
Compare
Choose a tag to compare

This release contains some code cleanup - separating responsibilities between classes, fixing minor issues, improving performance

  1. ConfigurableDependentPromise now contains only pure wrapper methods, no implementation for default methods (moved to Promise and PromiseHelper classes). It was logically incorrect to have anything but wrapping code in DependentPromise implementation.
  2. ConfigurableDependentPromise and promises originating from onCancel operator are true decorators now - it may be either directly completed/cancelled or via completion/cancellation of the wrapped promise (previously only direct version worked correctly).
  3. CompletableTask is no longer Runnable - separate RunnablePromise interface is introduced and CompletableTask internal subclass is used in ThreadPoolTaskExecutor and alike.
  4. AbstractCompletionStageDecorator decorator now uses CompletionStage as operators' return value, inherited AbstractPromiseLikeDecorator subclass is introduced with overloaded operators returning Promise. This allowed to introduce concrete CompletionStageDecorator and ExecutorBoundCompletionStage classes. The later exists previously, but in different package and copying a lot of code from AbstractCompletionStageDecorator.
  5. JDK version-specific helpers are introduced to correctly delegate CompletionStage calls whenever possible (incl. delegation to the new JDK 12 API methods). WARNING: you need both JDK 12 and JDK 8 to build project locally (JDK 8 is used only for docs).
  6. More efficient implementation of exceptionallyAsync and exceptionallyCompose[Async] is created for Promise implementations (both wrappers and AbstractCompletableTask).
  7. Promises.isCompletedExceptionally method added (as in CompletableFuture).
  8. All internal Promise usages are now CompletableFutureWrapper instead of CompletablePromise - so they never may be completed erroneously outside.
  9. CompletablePromise is extended to be complete CompletableFuture counterpart, incl. explicit completion and similar method from JDK 9 / 12 (complete, completeExceptionally, completeAsync, minimalCompletionStage, minimalCompletionPromise).
  10. Ad-hoc cancellation methods in custom CompletionStage implementations are better supported now (caching lookups, using MethodHandles instead of reflection, etc)
  11. Standardize CompletableFutureWrapper.toCompletableFuture(enlistOrigin) behavior - when returned CompletableFuture cancels original Promise and when it doesn't. Previously this behavior was broken.
  12. Adding non-blocking lock / semaphore / countDownLatch in net.tascalate.concurrent.locks package.
  13. DependentPromise.as_ is renamed to DependentPromise.asʹ (a special char on end).

Tascalate Concurrent 0.9.1

15 Sep 12:34
Compare
Choose a tag to compare

This release REPLACES 0.9.0 - the previous one is broken due to severe error in Promises.retry functionality as well as due to breaking changes in Promises.atLeast that should be done in major (0.x) release.
The changes are:

  1. Critical fix: Promises.retry functionality now restored (was endless loop if retry fails for the given attempts count)
  2. Critical fix: wrappers of CompletableFuture now overrides thenCompose[Async](fn) behavior for cancellation -- now the Promise returned from fn is cancelled as well (same as with CompletableTask).
  3. Critical incompatible change: Promises.atLeast and Promises.atLeastStrict now returns only successfully completed promises, same as Promises.all and Promises.any[Strict]. If you need to check positions of successfully completed promises please use new methods: Promises.atLeastOrdered and Promises.atLeastOrderedStrict. Both returns list of j.u.Optional, nullat corresponding position means that CompletionStage was settled with an error, non-null Optional corresponds to result (empty Optional means that original result was null).
  4. Get rid of sneaky-throwing exceptions in timeouts handling and for AsyncCompletions. Generally, AsyncCompletions now works like CompletableFuture.join() for the Iterator / Stream of promises.
  5. Variants of Promises.any[Strict] and Promises.atLeast[Strict] that accepts j.u.Map parameter now returns no more elements than it was requested.
  6. Added RetryCallable.of / RetryRunnable.of methods to simplify conversions of Callable / Runnable
  7. Added DelayPolicy.withCustomizer to let insert custom implementations of DelayPolicy wrappers in chained fashion.
  8. Added DependentPromise.as_ with more specific function arg type;
  9. Simplified RetryContext internals
  10. AggregatingPromise now cancels remaining promises before firing events - to release resources before using results of the AggregatingPromise itself; also this class is optimized for several usage scenarios.
  11. RetryPolicy.exceptionClassRetryable is overridable now;

Tascalate Concurrent 0.9.0

05 Aug 20:14
Compare
Choose a tag to compare

This release adds several major features as long as refactorings of the existing API (so it has some breaking changes):

  1. Revisit and refactor Promise.raw() functionality and introducing Promise.unwrap() (single-level undecoration) in addition to Promise.raw() (full undecoration); fixing all related code to use unwrap in favor of raw.
  2. Adding new operators to Promise - thenFilter and thenFilterAsync
  3. Adding missing Thread / Executor -related stuff: TaskCompletionService, TreadFactoryBuilder, ThreadGroupBuilder and alike.
  4. Revisiting ContextVar and related context-aware functionality: shifting responsibilities, introducing ContextTrampoline, provide an option to create contex-aware Executor-s in addition to context-aware Promise-s.
  5. Adding asynchronous version of try-with-resource functionality to Promises that supports both synchronously closeable resources (std. AutoClosable) and asynchronously closeable resources (implementing library-specific AsyncCloseable).
  6. Adding AsyncCompletions class that provides an option to iterate / stream over completed Promise-s results (loaded by batches).
  7. Providing an option to partitioned collections processing with Promises.partitioned.
  8. Introduce PromiseOperations class that exposes utility methods for convenient decoration of Promise-s via Promise.as(decorator) operation.
  9. Adding Promises.loop to provide asynchronous function-style equivalent of Java loops (like for / while / do-while).
  10. Refactor retry functionality (fix corner cases, simplifying code using asynchronous loop).
  11. 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

14 Jan 11:37
Compare
Choose a tag to compare

Minor release with the following changes:

  1. Fix bug in default DelayPolicy.withMinDelay(...) metod -- erroneously delegates to withMaxDelay.
  2. Remove rarely used internal helper classes to minimize library size.