Threadly Versions Save

A library of tools to assist with safe concurrent java development. Providing unique priority based thread pools, and ways to distrbute threaded work safely.

release-7.0

2 years ago

Enhancements:

  • Support for JDK 17
  • ListenableFutureTask and SettableListenableFuture were re-implemented to provide better compatibility and performance (#256)

Major API version change, breaking changes include:

  • Minimum JVM version updated to 11

Deprecation's removed:

  • ListenableFutureTask no longer supports a recurring or repeating mode of operation. Because of that the boolean to define the mode is no longer accepted. If you previously were passing a false for this argument it can be simply removed. If recurring execution is needed this can be hacked in easily (and is done within the library in our compatibility layer).
  • One of ConfigurableThreadFactory's constructors has been removed, supplying an additional null argument at the end will match 6.X's functionality.
  • The above constructor change also was done to ThreadReferencingThreadFactory. Supplying an additional null argument at the end will match 6.X's functionality.
  • SameThreadSubmitterExecutor can no longer be constructed. Internal optimizations require the use of SameThreadSubmitterExecutor.instance()
  • In Profiler invocations of dump where specifying if individual threads should be included have been removed. Now an additional argument must be specified for the minimum number of times a stack had to be witnessed before it was reported, allowing an even more concise output. Specifying an argument of 1 at the end will match 6.X's functionality.
  • UnsafeAccess was removed to comply with JDK 17 support

The above is summarized in our migration guide: https://github.com/threadly/threadly/wiki/Major-version-migration-guide#6x---7x

Feel free to join our Zulip chat or file an issue if you need help with migration

release-6.7

2 years ago

6.7 Release is primarily focused around API changes in ListenableFutureTask. In 7.0 the ability to have a recurring ListenableFutureTask is removed. For that reason the constructor has been changed to no longer accept a boolean for this recurring state. Assuming a false was previously provided this argument can now simply be removed.

release-6.6

3 years ago

Changes included in this release:

  • Added to StatisticsUtils getMax and getMin implementations in order to find the extreme values in a collection of Number's
  • FutureUtils.makeFirstResultFuture permutation added where errors are ignored.
  • FutureUtils.makeResultListFuture wont throw an IllegalStateException if a dependent future is canceled. Because it needs the results (unless errors are ignored), this is still a fatal condition. However the resulting future will now indicate this state instead of having the Exception thrown.

release-6.5

3 years ago
  • The constructor for SameThreadSubmitterExecutor has been deprecated. This was meant to be done earlier, instead SameThreadSubmitterExecutor.instance() should be used.

  • ReschedulingOperation performance improvements by to looping instead of immediately executing if it was signaled while running. This provides a couple improvements:

    • No need to incur the overhead of queuing and cross thread communication to execute immediately
    • When a SameThreadSubmitterExecutor is used this will avoid a possible stack overflow
  • ConfigurableThreadFactory now has the ability to add a listener to be provided threads as they are created. This can be useful for debugging or other monitoring code which needs to know about threads related to specific pools. Within the threadly library ControlledThreadProfiler is a perfect example of how this can be leveraged.

release-6.4

3 years ago

This release includes:

  • Bug fix to OrderedExecutorLimiter where canceled ListenableFuture's returned by it could result in a NullPointerException when sorting the queue.
  • Implemented issue #270 so that idle ForkJoinPool threads are identified and summarized in output

release-6.3

4 years ago

Improvements included in this release:

  • New constructor in Profiler to control how the dump is produced for the ListenableFuture result in a timed start. This can be useful when using the timed start and needing to produce large dumps or otherwise concerned about the performance impacts.
  • OrderedExecutorLimiter was extended to allow the limits to be adjusted at runtime just like the ExecutorLimiter can. If you extend ExecutorLimiter in your application please read the commit notes: https://github.com/threadly/threadly/commit/a21152e029d36343755e2acc0eca9c33ed261682

release-6.2

4 years ago

Improvements included in this release:

  • Added OrderedExecutorLimiter. This limiter provides the first way to provide a task ordering besides FIFO.
  • Minor logic simplifications in workerIdle loop in PriorityScheduler with reduced burdens to check for pool shutdown (now deferring only to the max pool size).
  • Fix for SingleThreadScheduler.prestartExecutionThread not blocking for the thread to start when invoked concurrently and another thread initiated the start. This is a very small window with no likely noticeable impact, but was still a simple fix.

release-6.1

4 years ago

Features and improvements in this release:

release-6.0

4 years ago

6.0 API update release:

  • org.threadly.test.concurrent package has been moved to a new artifact at the maven coordinates org.threadly:threadly-test:1.0.

  • BlockingQueueConsumer was replaced with a potentially more performant Poller.consumeQueue or a more direct replacement org.threadly.concurrent.processing.BlockingQueueConsumer

  • CentralThreadlyPool.lowPriorityPool(boolean) was replaced with either CentralThreadlyPool.lowPrioritySingleThreadPool() or CentralThreadlyPool.lowPriorityPool()

  • DoNothingRunnable can not be constructed, instead DoNothingRunnable.instance() should be used.

  • RunnableCallableAdapter can not be constructed, instead the static function RunnableCallableAdapter.adapt should be used.

  • RunnableChain was moved to the package org.threadly.concurrent.wrapper

  • AbstractFutureCallbackFailureHandler was removed, instead use ListenableFuture.failureCallback(Consumer)

  • AbstractFutureCallbackResultHandler was removed, instead use ListenableFuture.resultCallback(Consumer)

  • FutureCallbackExceptionHandlerAdapter was removed, instead use ListenableFuture.failureCallback(Consumer) (which allows an ExceptionHandler to be passed in)

  • FutureCallbackFailureHandler was removed, instead use ListenableFuture.failureCallback(Consumer)

  • FutureCallbackResultHandler was removed, instead use ListenableFuture.resultCallback(Consumer)

  • FutureUtils.scheduleWhileTaskResultNull was removed, instead just implement a small Predicate with a null check and use FutureUtils.scheduleWhile

  • Watchdog was renamed and moved to org.threadly.concurrent.future.watchdog.ConstantTimeWatchdog

  • WatchdogCache was renamed and moved to org.threadly.concurrent.future.watchdog.MixedTimeWatchdog

  • RunnableFutureCallbackAdapter was removed without replacement (more precise and performant lambda options are used now)

  • ListenableScheduledFuture interface was removed without replacement

  • ScheduledFutureDelegate was removed without replacement

  • StripedLock was removed without replacement

  • A variety of deprecated constructors were replaced, see 5.43 javadocs for details on how to migrate to a still supported constructor

We decided to keep this release smaller by limiting the scope to currently exclude:

  • A JVM upgrade will NOT be included, still allowing java 8 and newer.

  • Deeper API considerations previously planned for 6.0 are going to be pushed to potentially a 7.0 release.

release-5.43

4 years ago

This is the last release before the 6.0 major version bump. This release includes:

  • Added CompletableFutureAdapter to allow the easy use threadly ListenableFuture with java.util.concurrent.CompletableFuture types.
  • ConstantTimeWatchdog was improved to reduce Clock updates when there is no futures ready to expire (goes from two clock updates to one)
  • KeyDistributedScheduler has minor GC overhead improvements for recurring tasks
  • All classes in org.threadly.test.concurrent package are marked as deprecated, now provided from the org.threadly:threadly-test:0.1 artifact: https://github.com/threadly/threadly-test