Release v1.0.5, edge v0.3.1 (26 Feb 2017)
concurrent-ruby:
- Documentation for Event and Semaphore
- Use Unsafe#fullFence and #loadFence directly since the shortcuts were removed in JRuby
- Do not depend on org.jruby.util.unsafe.UnsafeHolder
concurrent-ruby-edge:
- (#620) Actors on Pool raise an error
- (#624) Delayed promises did not interact correctly with flatting
- Fix arguments yielded by callback methods
- Overridable default executor in promises factory methods
- Asking actor to terminate will always resolve to
true
Release v1.0.4, edge v0.3.0 (27 Dec 2016)
concurrent-ruby:
- Nothing
concurrent-ruby-edge:
- New promises' API renamed, lots of improvements, edge bumped to 0.3.0
- Incompatible with previous 0.2.3 version
- see https://github.com/ruby-concurrency/concurrent-ruby/pull/522
Release v1.0.3 (17 Dec 2016)
- 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
Release v1.0.2 (2 May 2016)
- Fix bug with
Concurrent::MapMRI backend#inspectmethod - Fix bug with
Concurrent::MapMRI backend usingHash#value? - Improved documentation and examples
- Minor updates to Edge
Release v1.0.1 (27 February 2016)
- Fix "uninitialized constant Concurrent::ReentrantReadWriteLock" error.
- Better handling of
autoloadvs.require. - Improved API for Edge
Futurezipping. - Fix reference leak in Edge
Futureconstructor . - Fix bug which prevented thread pools from surviving a
fork. - Fix bug in which
TimerTaskdid not correctly specify all its dependencies. - Improved support for JRuby+Truffle
- Improved error messages.
- Improved documentation.
- Updated README and CONTRIBUTING.
Release v1.0.0 (13 November 2015)
- Rename
attr_volatile_with_castoattr_atomic - Add
clear_eachtoLockFreeStack - Update
AtomicReferencedocumentation - Further updates and improvements to the synchronization layer.
- Performance and memory usage performance with
Actorlogging. - Fixed
ThreadPoolExecutortask count methods. - Improved
Asyncperformance for both short and long-lived objects. - Fixed bug in
LockFreeLinkedSet. - Fixed bug in which
Agent#awaittriggered a validation failure. - Further
Channelupdates. - Adopted a project Code of Conduct
- Cleared interpreter warnings
- Fixed bug in
ThreadPoolExecutortask 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
Channelimplementation in Edge gem. - Simplification of
RubySingleThreadExecutor Asyncimprovements- Each object uses its own
SingleThreadExecutorinstead of the global thread pool. - No longers supports executor injection
- Much better documentation
- Each object uses its own
Atomupdates- No longer
Dereferenceable - Now
Observable - Added a
#resetmethod
- No longer
- Brand new
AgentAPI and implementation. Now functionally equivalent to Clojure. - Continued improvements to the synchronization layer
- Merged in the
thread_safegemConcurrent::ArrayConcurrent::HashConcurrent::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
Release v0.9.1 (09 August 2015)
- Fixed a Rubiniux bug in synchronization object
- Fixed all interpreter warnings (except circular references)
- Fixed require statements when requiring
Atomalone - Significantly improved
ThreadLocalVaron non-JRuby platforms - Fixed error handling in Edge
Concurrent.zip AtomicFixnummethods#incrementand#decrementnow support optional delta- New
AtomicFixnum#updatemethod - Minor optimizations in
ReadWriteLock - New
ReentrantReadWriteLockclass ThreadLocalVar#bindmethod is now public- Refactored many tests
Release v0.9.0 (10 July 2015)
- Updated
AtomicReferenceAtomicReference#try_updatenow simply returns instead of raising exceptionAtomicReference#try_update!was added to raise exceptions if an update fails. Note: this is the same behavior as the oldtry_update
- Pure Java implementations of
AtomicBooleanAtomicFixnumSemaphore
- Fixed bug when pruning Ruby thread pools
- Fixed bug in time calculations within
ScheduledTask - Default
countinCountDownLatchto 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, andScheduledTask
- Use
- Deprecated all clock-time based timer scheduling
- Only support scheduling by delay
- Effects
Concurrent.timer,TimerSet, andScheduledTask
- Added new
ReadWriteLockclass - Consistent
at_exitbehavior for Java and Ruby thread pools. - Added
at_exithandler to Ruby thread pools (already in Java thread pools)- Ruby handler stores the object id and retrieves from
ObjectSpace - JRuby disables
ObjectSpaceby default so that handler stores the object reference
- Ruby handler stores the object id and retrieves from
- Added a
:stop_on_exitoption to thread pools to enable/disableat_exithandler - Updated thread pool docs to better explain shutting down thread pools
- Simpler
:executoroption syntax for all abstractions which support this option - Added
Executor#auto_terminate?predicate method (for thread pools) - Added
at_exithandler toTimerSet - 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::ConfigurationtoConcurrent- 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
Actorcausing it to prematurely warm global thread pools on gem load- This also fixed a
RejectedExecutionErrorbug when running with minitest/autorun via JRuby
- This also fixed a
- Moved global logger up to the
Concurrentnamespace 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
Futurewhen the handler raises Exception - Added shared specs for more classes
- New concurrency abstractions including:
AtomMaybeImmutableStructMutableStructSettableStruct
- Created an Edge gem for unstable abstractions including
ActorAgentChannelExchangerLazyRegister- new Future Framework http://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,TimerTaskinto 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
IVarfor 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: trueis 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
Channelto use newer synchronization objects - Added
#resetand#cancelmethods toTimerSet - Added
#cancelmethod toFutureandScheduledTask - Refactored
TimerSetto useScheduledTask - Updated
Asyncwith a factory that initializes the object - Deprecated
Concurrent.timerandConcurrent.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
Release v0.8.0 (25 January 2015)
- C extension for MRI have been extracted into the
concurrent-ruby-extcompanion gem. Please see the README for more detail. - Better variable isolation in
PromiseandFuturevia an:argsoption - Continued to update intermittently failing tests
Release v0.7.2 (24 January 2015)
- New
Semaphoreclass based on java.util.concurrent.Semaphore - New
Promise.all?andPromise.any?class methods - Renamed
:overflow_policyon thread pools to:fallback_policy - Thread pools still accept the
:overflow_policyoption but display a warning - Thread pools now implement
fallback_policybehavior when not running (rather than universally rejecting tasks) - Fixed minor
set_deref_optionsconstructor bug inPromiseclass - Fixed minor
requirebug inThreadLocalVarclass - Fixed race condition bug in
TimerSetclass - Fixed race condition bug in
TimerSetclass - Fixed signal bug in
TimerSet#postmethod - 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
Release v0.7.1 (4 December 2014)
Please see the roadmap for more information on the next planned release.
- Added
flat_mapmethod toPromise - Added
zipmethod toPromise - Fixed bug with logging in
Actor - Improvements to
Promisetests - Removed actor-experimental warning
- Added an
IndirectImmediateExecutorclass - Allow disabling auto termination of global executors
- Fix thread leaking in
ThreadLocalVar(usesRefgem on non-JRuby systems) - Fix thread leaking when pruning pure-Ruby thread pools
- Prevent
Actorfrom using anImmediateExecutor(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
JavaThreadPoolExecutorwith minimum pool size of zero - Removed confusing warning when not using native extenstions
- Improved documentation
Release v0.7.0 (13 August 2014)
- Merge the atomic gem
- Pure Ruby
MutexAtomicatomic reference class - Platform native atomic reference classes
CAtomic,JavaAtomic, andRbxAtomic - 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
- Pure Ruby
- C native
CAtomicBoolean - C native
CAtomicFixnum - Refactored intermittently failing tests
- Added
dataflow!anddataflow_with!methods to matchFuture#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.
RestartingContextwill 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_oneand: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
Actorclass removed and replaced by new implementation previously calledActress.Actresswas kept as an alias forActorto keep compatibility. Utils::Broadcastactor which allows Publish–subscribe pattern.
- Fine-grained implementation using chain of behaviors. Each behavior is responsible for single aspect like:
- More executors for managing serialized operations
SerializedExecutionmixin moduleSerializedExecutionDelegatorfor serializing any executor
- Updated
Asyncwith serialized execution - Updated
ImmediateExecutorandPerThreadExecutorwith full executor service lifecycle - Added a
Delayto rootActressinitialization - 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
RubyCachedThreadPooloverflow policy - Updated tests to use RSpec 3.0
- Removed deprecated
Actorclass - Better support for Rubinius
Release v0.6.1 (14 June 2014)
- Many improvements to
Concurrent::Actress - Bug fixes to
Concurrent::RubyThreadPoolExecutor - Fixed several brittle tests
- Moved documentation to http://ruby-concurrency.github.io/concurrent-ruby/frames.html
Release v0.6.0 (25 May 2014)
- Added
Concurrent::Observableto encapsulate our thread safe observer sets - Improvements to new
Channel - Major improvements to
CachedThreadPoolandFixedThreadPool - Added
SingleThreadExecutor - Added
Current::timerfunction - Added
TimerSetexecutor - Added
AtomicBoolean ScheduledTaskrefactoring- Pure Ruby and JRuby-optimized
PriorityQueueclasses - Updated
Agentbehavior to more closely match Clojure - Observer sets support block callbacks to the
add_observermethod - New algorithm for thread creation in
RubyThreadPoolExecutor - Minor API updates to
Event - Rewritten
TimerTasknow anExecutorinstead of aRunnable - Fixed many brittle specs
- Renamed
FixedThreadPoolandCachedThreadPooltoRubyFixedThreadPoolandRubyCachedThreadPool - Created JRuby optimized
JavaFixedThreadPoolandJavaCachedThreadPool - Consolidated fixed thread pool tests into
spec/concurrent/fixed_thread_pool_shared.rbandspec/concurrent/cached_thread_pool_shared.rb FixedThreadPoolnow subclassesRubyFixedThreadPoolorJavaFixedThreadPoolas appropriateCachedThreadPoolnow subclassesRubyCachedThreadPoolorJavaCachedThreadPoolas appropriate- New
Delayclass Concurrent::processor_counthelper function- New
Asyncmodule - Renamed
NullThreadPooltoPerThreadExecutor - Deprecated
Channel(we are planning a new implementation based on Go) - Added gem-level configuration
- Deprecated
$GLOBAL_THREAD_POOLin lieu of gem-level configuration - Removed support for Ruby 1.9.2
- New
RubyThreadPoolExecutorandJavaThreadPoolExecutorclasses - 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
UsesGlobalThreadPoolin lieu of explicit:executoroption (dependency injection) onFuture,Promise, andAgent - Added
Concurrent::dataflow_with(executor, *inputs)method to support executor dependency injection for dataflow - Software transactional memory with
TVarandConcurrent::atomically - First implementation of new, high-performance
Channel Actoris deprecated in favor of new experimental actor implementation #73. To avoid namespace collision it is living inActressnamespace untilActoris removed in next release.
Release v0.5.0
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 Futureupdated withexecuteAPIScheduledTaskupdated withexecuteAPI- New
PromiseAPI Futurenow extendsIVarPostable#post?now returns anIVar- 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