Skip to content

Fixed bugs found while building the 0.9 release. #365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 10, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
### Next Release v0.9.0 (Target Date: 7 June 2015)

## Current Release v0.9.0 (10 July 2015)

* Updated `AtomicReference`
- `AtomicReference#try_update` now simply returns instead of raising exception
Expand Down Expand Up @@ -98,7 +97,7 @@
* Removed brute-force killing of threads in tests
* Fixed a thread pool bug when the operating system cannot allocate more threads

## Current Release v0.8.0 (25 January 2015)
### 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.
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ gemspec name: 'concurrent-ruby-edge'
group :development do
gem 'rake', '~> 10.4.2'
gem 'rake-compiler', '~> 0.9.5'
gem 'rake-compiler-dock', '~> 0.4.2'
gem 'rake-compiler-dock', '~> 0.4.3'
gem 'gem-compiler', '~> 0.3.0'
gem 'benchmark-ips', '~> 2.2.0'

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $:.push File.join(File.dirname(__FILE__), 'lib')
require 'concurrent/version'
require 'concurrent/utility/native_extension_loader'

## load the two gemspec files
## load the gemspec files
CORE_GEMSPEC = Gem::Specification.load('concurrent-ruby.gemspec')
EXT_GEMSPEC = Gem::Specification.load('concurrent-ruby-ext.gemspec')
EDGE_GEMSPEC = Gem::Specification.load('concurrent-ruby-edge.gemspec')
Expand Down
3 changes: 2 additions & 1 deletion lib/concurrent/concern/logging.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'logger'
require 'concurrent/configuration'

module Concurrent
module Concern
Expand All @@ -16,6 +15,8 @@ module Logging
# @param [String, nil] message when nil block is used to generate the message
# @yieldreturn [String] a message
def log(level, progname, message = nil, &block)
#NOTE: Cannot require 'concurrent/configuration' above due to circular references.
# Assume that the gem has been initialized if we've gotten this far.
(@logger || Concurrent.global_logger).call level, progname, message, &block
rescue => error
$stderr.puts "`Concurrent.configuration.logger` failed to log #{[level, progname, message, block]}\n" +
Expand Down
12 changes: 6 additions & 6 deletions lib/concurrent/utility/at_exit.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'concurrent/concern/logging'
require 'logger'
require 'concurrent/synchronization'

module Concurrent
Expand All @@ -8,7 +8,7 @@ module Concurrent
#
# @!visibility private
class AtExitImplementation < Synchronization::Object
include Concern::Logging
include Logger::Severity

def initialize(*args)
super()
Expand Down Expand Up @@ -46,9 +46,9 @@ def handlers
def install
synchronize do
@installed ||= begin
at_exit { runner }
true
end
at_exit { runner }
true
end
self
end
end
Expand All @@ -71,7 +71,7 @@ def run
begin
handler.call
rescue => error
log ERROR, error
Concurrent.global_logger.call(ERROR, error)
end
end
handlers.keys
Expand Down