## Current 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 `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 ### Release v0.9.0 (10 July 2015) * 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** - 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 ### Release v0.8.0 (25 January 2015) * 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 ### Release v0.7.2 (24 January 2015) * New `Semaphore` class based on [java.util.concurrent.Semaphore](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Semaphore.html) * 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 ### Release v0.7.1 (4 December 2014) Please see the [roadmap](https://github.com/ruby-concurrency/concurrent-ruby/issues/142) 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 ### Release v0.7.0 (13 August 2014) * Merge the [atomic](https://github.com/ruby-concurrency/atomic) gem - Pure Ruby `MutexAtomic` atomic reference class - Platform native atomic reference classes `CAtomic`, `JavaAtomic`, and `RbxAtomic` - Automated [build process](https://github.com/ruby-concurrency/rake-compiler-dev-box) - Fat binary releases for [multiple platforms](https://rubygems.org/gems/concurrent-ruby/versions) 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](http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3) * Removed deprecated `Actor` class * 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::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](http://golangtutorials.blogspot.com/2011/06/channels-in-go.html)) * Added gem-level [configuration](http://robots.thoughtbot.com/mygem-configure-block) * Deprecated `$GLOBAL_THREAD_POOL` in lieu of gem-level configuration * Removed support for Ruby [1.9.2](https://www.ruby-lang.org/en/news/2013/12/17/maintenance-of-1-8-7-and-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](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html)) * 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](https://github.com/ruby-concurrency/concurrent-ruby/pull/49) `Channel` * `Actor` is deprecated in favor of new experimental actor implementation [#73](https://github.com/ruby-concurrency/concurrent-ruby/pull/73). To avoid namespace collision it is living in `Actress` namespace until `Actor` is 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](http://jruby.org/) and [Rubinius](http://rubini.us/)) * 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](API-Updates-in-v0.5.0) 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](https://codeclimate.com/) code review * Improved YARD documentation