Skip to content

Commit

Permalink
Merge pull request #365 from ruby-concurrency/fixed-build-bugs
Browse files Browse the repository at this point in the history
Fixed bugs found while building the 0.9 release.
  • Loading branch information
jdantonio committed Jul 10, 2015
2 parents e77e51f + 9a1b42b commit 9ffdff7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
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

0 comments on commit 9ffdff7

Please sign in to comment.