Trigger execution of flattened delayed futures
Avoid forking for processor_count if possible
Semaphore Mutex and JRuby parity
Adds Map#each as alias to Map#each_pair
Fix uninitialized instance variables
Make Fixnum, Bignum merger ready
Allows Promise#then to receive an executor
TimerSet now survives a fork
Reject promise on any exception
Allow ThreadLocalVar to be initialized with a block
Support Alpha with Concurrent::processor_count
Fixes format-security error when compiling ruby_193_compatible.h
Concurrent::Atom#swap fixed: reraise the exceptions from block
Fix bug with Concurrent::Map
MRI backend #inspect
method
Fix bug with Concurrent::Map
MRI backend using
Hash#value?
Improved documentation and examples
Minor updates to Edge
Fix “uninitialized constant Concurrent::ReentrantReadWriteLock” error.
Better handling of autoload
vs. require
.
Improved API for Edge Future
zipping.
Fix reference leak in Edge Future
constructor .
Fix bug which prevented thread pools from surviving a fork
.
Fix bug in which TimerTask
did not correctly specify all its
dependencies.
Improved support for JRuby+Truffle
Improved error messages.
Improved documentation.
Updated README and CONTRIBUTING.
Rename attr_volatile_with_cas
to attr_atomic
Add clear_each
to LockFreeStack
Update AtomicReference
documentation
Further updates and improvements to the synchronization layer.
Performance and memory usage performance with Actor
logging.
Fixed ThreadPoolExecutor
task count methods.
Improved Async
performance for both short and long-lived
objects.
Fixed bug in LockFreeLinkedSet
.
Fixed bug in which Agent#await
triggered a validation failure.
Further Channel
updates.
Adopted a project Code of Conduct
Cleared interpreter warnings
Fixed bug in ThreadPoolExecutor
task count methods
Fixed bug in 'LockFreeLinkedSet'
Improved Java extension loading
Handle Exception children in Edge::Future
Continued improvements to channel
Removed interpreter warnings.
Shared constants now in lib/concurrent/constants.rb
Refactored many tests.
Improved synchronization layer/memory model documentation.
Bug fix in Edge Future#flat
Brand new Channel
implementation in Edge gem.
Simplification of RubySingleThreadExecutor
Async
improvements
Each object uses its own SingleThreadExecutor
instead of the
global thread pool.
No longers supports executor injection
Much better documentation
Atom
updates
No longer Dereferenceable
Now Observable
Added a #reset
method
Brand new Agent
API and implementation. Now functionally
equivalent to Clojure.
Continued improvements to the synchronization layer
Merged in the thread_safe
gem
Concurrent::Array
Concurrent::Hash
Concurrent::Map
(formerly ThreadSafe::Cache)
Concurrent::Tuple
Minor improvements to Concurrent::Map
Complete rewrite of Exchanger
Removed all deprecated code (classes, methods, constants, etc.)
Updated Agent, MutexAtomic, and BufferedChannel to inherit from Synchronization::Object.
Many improved tests
Some internal reorganization
Fixed a Rubiniux bug in synchronization object
Fixed all interpreter warnings (except circular references)
Fixed require statements when requiring Atom
alone
Significantly improved ThreadLocalVar
on non-JRuby platforms
Fixed error handling in Edge Concurrent.zip
AtomicFixnum
methods #increment
and
#decrement
now support optional delta
New AtomicFixnum#update
method
Minor optimizations in ReadWriteLock
New ReentrantReadWriteLock
class
ThreadLocalVar#bind
method is now public
Refactored many tests
Updated AtomicReference
AtomicReference#try_update
now simply returns instead of
raising exception
AtomicReference#try_update!
was added to raise exceptions if
an update
fails. Note: this is the same behavior as the old
try_update
Pure Java implementations of
AtomicBoolean
AtomicFixnum
Semaphore
Fixed bug when pruning Ruby thread pools
Fixed bug in time calculations within ScheduledTask
Default count
in CountDownLatch
to 1
Use monotonic clock for all timers via
Concurrent.monotonic_time
Use Process.clock_gettime(Process::CLOCK_MONOTONIC)
when
available
Fallback to java.lang.System.nanoTime()
on unsupported JRuby
versions
Pure Ruby implementation for everything else
Effects Concurrent.timer
, Concurrent.timeout
,
TimerSet
, TimerTask
, and
ScheduledTask
Deprecated all clock-time based timer scheduling
Only support scheduling by delay
Effects Concurrent.timer
, TimerSet
, and
ScheduledTask
Added new ReadWriteLock
class
Consistent at_exit
behavior for Java and Ruby thread pools.
Added at_exit
handler to Ruby thread pools (already in Java
thread pools)
Ruby handler stores the object id and retrieves from
ObjectSpace
JRuby disables ObjectSpace
by default so that handler stores
the object reference
Added a :stop_on_exit
option to thread pools to enable/disable
at_exit
handler
Updated thread pool docs to better explain shutting down thread pools
Simpler :executor
option syntax for all abstractions which
support this option
Added Executor#auto_terminate?
predicate method (for thread
pools)
Added at_exit
handler to TimerSet
Simplified auto-termination of the global executors
Can now disable auto-termination of global executors
Added shutdown/kill/wait_for_termination variants for global executors
Can now disable auto-termination for all executors (the nuclear option)
Simplified auto-termination of the global executors
Deprecated terms “task pool” and “operation pool”
New terms are “io executor” and “fast executor”
New functions added with new names
Deprecation warnings added to functions referencing old names
Moved all thread pool related functions from
Concurrent::Configuration
to Concurrent
Old functions still exist with deprecation warnings
New functions have updated names as appropriate
All high-level abstractions default to the “io executor”
Fixed bug in Actor
causing it to prematurely warm global
thread pools on gem load
This also fixed a RejectedExecutionError
bug when running with
minitest/autorun via JRuby
Moved global logger up to the Concurrent
namespace and
refactored the code
Optimized the performance of Delay
Fixed a bug in which no executor option on construction caused block execution on a global thread pool
Numerous improvements and bug fixes to TimerSet
Fixed deadlock of Future
when the handler raises Exception
Added shared specs for more classes
New concurrency abstractions including:
Atom
Maybe
ImmutableStruct
MutableStruct
SettableStruct
Created an Edge gem for unstable abstractions including
Actor
Agent
Channel
Exchanger
LazyRegister
new Future Framework ruby-concurrency.github.io/concurrent-ruby/Concurrent/Edge.html
- unified
implementation of Futures and Promises which combines Features of
previous Future
,
Promise
, IVar
,
Event
, Probe
, dataflow
,
Delay
, TimerTask
into single framework. It uses
extensively
new synchronization layer to make all the paths
lock-free with exception of blocking threads on
#wait
.
It offers better performance and does not block threads
when not required.
Actor framework changes:
fixed reset loop in Pool
Pool can use any actor as a worker, abstract worker class is no longer needed.
Actor events not have format [:event_name, *payload]
instead
of just the Symbol.
Actor now uses new Future/Promise Framework instead of IVar
for better interoperability
Behaviour definition array was simplified to [BehaviourClass1,
[BehaviourClass2, *initialization_args]]
Linking behavior responds to :linked message by returning array of linked actors
Supervised behavior is removed in favour of just Linking
RestartingContext is supervised by default now, supervise:
true
is not required any more
Events can be private and public, so far only difference is that Linking will pass to linked actors only public messages. Adding private :restarting and :resetting events which are send before the actor restarts or resets allowing to add callbacks to cleanup current child actors.
Print also object_id in Reference to_s
Add AbstractContext#default_executor to be able to override executor class wide
Add basic IO example
Documentation somewhat improved
All messages should have same priority. It's now possible to send
actor << job1 << job2 << :terminate!
and
be
sure that both jobs are processed first.
Refactored Channel
to use newer synchronization objects
Added #reset
and #cancel
methods to
TimerSet
Added #cancel
method to Future
and
ScheduledTask
Refactored TimerSet
to use ScheduledTask
Updated Async
with a factory that initializes the object
Deprecated Concurrent.timer
and
Concurrent.timeout
Reduced max threads on pure-Ruby thread pools (abends around 14751 threads)
Moved many private/internal classes/modules into “namespace” modules
Removed brute-force killing of threads in tests
Fixed a thread pool bug when the operating system cannot allocate more threads
C extension for MRI have been extracted into the
concurrent-ruby-ext
companion gem.
Please see the README for more detail.
Better variable isolation in Promise
and Future
via an :args
option
Continued to update intermittently failing tests
New Semaphore
class based on java.util.concurrent.Semaphore
New Promise.all?
and Promise.any?
class methods
Renamed :overflow_policy
on thread pools to
:fallback_policy
Thread pools still accept the :overflow_policy
option but
display a warning
Thread pools now implement fallback_policy
behavior when not
running (rather than universally rejecting tasks)
Fixed minor set_deref_options
constructor bug in
Promise
class
Fixed minor require
bug in ThreadLocalVar
class
Fixed race condition bug in TimerSet
class
Fixed race condition bug in TimerSet
class
Fixed signal bug in TimerSet#post
method
Numerous non-functional updates to clear warning when running in debug mode
Fixed more intermittently failing tests
Tests now run on new Travis build environment
Multiple documentation updates
Please see the roadmap for more information on the next planned release.
Added flat_map
method to Promise
Added zip
method to Promise
Fixed bug with logging in Actor
Improvements to Promise
tests
Removed actor-experimental warning
Added an IndirectImmediateExecutor
class
Allow disabling auto termination of global executors
Fix thread leaking in ThreadLocalVar
(uses Ref
gem on non-JRuby systems)
Fix thread leaking when pruning pure-Ruby thread pools
Prevent Actor
from using an ImmediateExecutor
(causes deadlock)
Added missing synchronizations to TimerSet
Fixed bug with return value of
Concurrent::Actor::Utils::Pool#ask
Fixed timing bug in TimerTask
Fixed bug when creating a JavaThreadPoolExecutor
with minimum
pool size of zero
Removed confusing warning when not using native extenstions
Improved documentation
Merge the atomic gem
Pure Ruby MutexAtomic
atomic reference class
Platform native atomic reference classes CAtomic
,
JavaAtomic
, and RbxAtomic
Automated build process
Fat binary releases for multiple platforms including Windows (32/64), Linux (32/64), OS X (64-bit), Solaris (64-bit), and JRuby
C native CAtomicBoolean
C native CAtomicFixnum
Refactored intermittently failing tests
Added dataflow!
and dataflow_with!
methods to
match Future#value!
method
Better handling of timeout in Agent
Actor Improvements
Fine-grained implementation using chain of behaviors. Each behavior is
responsible for single aspect like: Termination
,
Pausing
, Linking
, Supervising
, etc.
Users can create custom Actors easily based on their needs.
Supervision was added. RestartingContext
will pause on error
waiting on its supervisor to decide what to do next ( options are
:terminate!
, :resume!
, :reset!
,
:restart!
). Supervising behavior also supports strategies
:one_for_one
and :one_for_all
.
Linking was added to be able to monitor actor's events like:
:terminated
, :paused
, :restarted
,
etc.
Dead letter routing added. Rejected envelopes are collected in a
configurable actor (default:
Concurrent::Actor.root.ask!(:dead_letter_routing)
)
Old Actor
class removed and replaced by new implementation
previously called Actress
. Actress
was kept as an
alias for Actor
to keep compatibility.
Utils::Broadcast
actor which allows Publish–subscribe pattern.
More executors for managing serialized operations
SerializedExecution
mixin module
SerializedExecutionDelegator
for serializing any
executor
Updated Async
with serialized execution
Updated ImmediateExecutor
and PerThreadExecutor
with full executor service lifecycle
Added a Delay
to root Actress
initialization
Minor bug fixes to thread pools
Refactored many intermittently failing specs
Removed Java interop warning executor.rb:148 warning: ambiguous Java
methods found, using submit(java.lang.Runnable)
Fixed minor bug in RubyCachedThreadPool
overflow policy
Updated tests to use RSpec 3.0
Removed deprecated Actor
class
Better support for Rubinius
Many improvements to Concurrent::Actress
Bug fixes to Concurrent::RubyThreadPoolExecutor
Fixed several brittle tests
Moved documentation to ruby-concurrency.github.io/concurrent-ruby/frames.html
Added Concurrent::Observable
to encapsulate our thread safe
observer sets
Improvements to new Channel
Major improvements to CachedThreadPool
and
FixedThreadPool
Added SingleThreadExecutor
Added Current::timer
function
Added TimerSet
executor
Added AtomicBoolean
ScheduledTask
refactoring
Pure Ruby and JRuby-optimized PriorityQueue
classes
Updated Agent
behavior to more closely match Clojure
Observer sets support block callbacks to the add_observer
method
New algorithm for thread creation in RubyThreadPoolExecutor
Minor API updates to Event
Rewritten TimerTask
now an Executor
instead of a
Runnable
Fixed many brittle specs
Renamed FixedThreadPool
and CachedThreadPool
to
RubyFixedThreadPool
and RubyCachedThreadPool
Created JRuby optimized JavaFixedThreadPool
and
JavaCachedThreadPool
Consolidated fixed thread pool tests into
spec/concurrent/fixed_thread_pool_shared.rb
and
spec/concurrent/cached_thread_pool_shared.rb
FixedThreadPool
now subclasses
RubyFixedThreadPool
or JavaFixedThreadPool
as
appropriate
CachedThreadPool
now subclasses
RubyCachedThreadPool
or JavaCachedThreadPool
as
appropriate
New Delay
class
Concurrent::processor_count
helper function
New Async
module
Renamed NullThreadPool
to PerThreadExecutor
Deprecated Channel
(we are planning a new implementation based
on Go)
Added gem-level configuration
Deprecated $GLOBAL_THREAD_POOL
in lieu of gem-level
configuration
Removed support for Ruby 1.9.2
New RubyThreadPoolExecutor
and
JavaThreadPoolExecutor
classes
All thread pools now extend the appropriate thread pool executor classes
All thread pools now support :overflow_policy
(based on
Java's reject
policies)
Deprecated UsesGlobalThreadPool
in lieu of explicit
:executor
option (dependency injection) on
Future
, Promise
, and Agent
Added Concurrent::dataflow_with(executor, *inputs)
method to
support executor dependency injection for dataflow
Software transactional memory with TVar
and
Concurrent::atomically
First implementation of new,
high-performance Channel
Actor
is deprecated in favor of new experimental actor
implementation #73.
To avoid namespace collision it is living in Actress
namespace
until Actor
is removed in next release.
This is the most significant release of this gem since its inception. This release includes many improvements and optimizations. It also includes several bug fixes. The major areas of focus for this release were:
Stability improvements on Ruby versions with thread-level parallelism (JRuby and Rubinius)
Creation of new low-level concurrency abstractions
Internal refactoring to use the new low-level abstractions
Most of these updates had no effect on the gem API. There are a few notable exceptions which were unavoidable. Please read the release notes for more information.
Specific changes include:
New class IVar
New class MVar
New class ThreadLocalVar
New class AtomicFixnum
New class method dataflow
New class Condition
New class CountDownLatch
New class DependencyCounter
New class SafeTaskExecutor
New class CopyOnNotifyObserverSet
New class CopyOnWriteObserverSet
Future
updated with execute
API
ScheduledTask
updated with execute
API
New Promise
API
Future
now extends IVar
Postable#post?
now returns an IVar
Thread safety fixes to Dereferenceable
Thread safety fixes to Obligation
Thread safety fixes to Supervisor
Thread safety fixes to Event
Various other thread safety (race condition) fixes
Refactored brittle tests
Implemented pending tests
Added JRuby and Rubinius as Travis CI build targets
Added CodeClimate code review
Improved YARD documentation