Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rubygem-concurrent-ruby for openSUSE:Factory checked in at 2021-07-04 22:10:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-concurrent-ruby (Old) and /work/SRC/openSUSE:Factory/.rubygem-concurrent-ruby.new.2625 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-concurrent-ruby" Sun Jul 4 22:10:24 2021 rev:13 rq:903492 version:1.1.9 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-concurrent-ruby/rubygem-concurrent-ruby.changes 2021-01-21 21:55:24.753796316 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-concurrent-ruby.new.2625/rubygem-concurrent-ruby.changes 2021-07-04 22:10:25.989372797 +0200 @@ -1,0 +2,17 @@ +Thu Jun 24 17:12:01 UTC 2021 - Stephan Kulow <co...@suse.com> + +updated to version 1.1.9 + see installed CHANGELOG.md + + ## Release v1.1.9 (5 Jun 2021) + + concurrent-ruby: + + * (#866) Child promise state not set to :pending immediately after #execute when parent has completed + * (#905, #872) Fix RubyNonConcurrentPriorityQueue#delete method + * (2df0337d) Make sure locks are not shared on shared when objects are dup/cloned + * (#900, #906, #796, #847, #911) Fix Concurrent::Set tread-safety issues on CRuby + * (#907) Add new ConcurrentMap backend for TruffleRuby + + +------------------------------------------------------------------- Old: ---- concurrent-ruby-1.1.8.gem New: ---- concurrent-ruby-1.1.9.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-concurrent-ruby.spec ++++++ --- /var/tmp/diff_new_pack.dW6yuI/_old 2021-07-04 22:10:26.465369115 +0200 +++ /var/tmp/diff_new_pack.dW6yuI/_new 2021-07-04 22:10:26.469369084 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-concurrent-ruby -Version: 1.1.8 +Version: 1.1.9 Release: 0 %define mod_name concurrent-ruby %define mod_full_name %{mod_name}-%{version} ++++++ concurrent-ruby-1.1.8.gem -> concurrent-ruby-1.1.9.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 2021-01-20 10:56:59.000000000 +0100 +++ new/CHANGELOG.md 2021-06-05 14:47:58.000000000 +0200 @@ -1,7 +1,19 @@ ## Current +## Release v1.1.9 (5 Jun 2021) + +concurrent-ruby: + +* (#866) Child promise state not set to :pending immediately after #execute when parent has completed +* (#905, #872) Fix RubyNonConcurrentPriorityQueue#delete method +* (2df0337d) Make sure locks are not shared on shared when objects are dup/cloned +* (#900, #906, #796, #847, #911) Fix Concurrent::Set tread-safety issues on CRuby +* (#907) Add new ConcurrentMap backend for TruffleRuby + ## Release v1.1.8 (20 January 2021) +concurrent-ruby: + * (#885) Fix race condition in TVar for stale reads * (#884) RubyThreadLocalVar: Do not iterate over hash which might conflict with new pair addition diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2021-01-20 10:56:59.000000000 +0100 +++ new/README.md 2021-06-05 14:47:58.000000000 +0200 @@ -353,19 +353,43 @@ No gems should depend on `concurrent-ruby-ext`. Doing so will force C extensions on your users. The best practice is to depend on `concurrent-ruby` and let users to decide if they want C extensions. +## Building the gem + +### Requirements + +* Recent CRuby +* JRuby, `rbenv install jruby-9.2.17.0` +* Set env variable `CONCURRENT_JRUBY_HOME` to point to it, e.g. `/usr/local/opt/rbenv/versions/jruby-9.2.17.0` +* Install Docker, required for Windows builds + +### Publishing the Gem + +* Update`version.rb` +* Update the CHANGELOG +* Update the Yard documentation + - Add the new version to `docs-source/signpost.md`. Needs to be done only if there are visible changes in the + documentation. + - Run `bundle exec rake yard` to update the master documentation and signpost. + - Run `bundle exec rake yard:<new-version>` to add or update the documentation of the new version. +* Commit (and push) the changes. +* Use `be rake release` to release the gem. It consists + of `['release:checks', 'release:build', 'release:test', 'release:publish']` steps. It will ask at the end before + publishing anything. Steps can also be executed individually. + ## Maintainers -* [Petr Chalupa](https://github.com/pitr-ch) (lead maintainer, point-of-contact) -* [Jerry D'Antonio](https://github.com/jdantonio) (creator) -* [Chris Seaton](https://github.com/chrisseaton) +* [Petr Chalupa](https://github.com/pitr-ch) ??? Lead maintainer, point-of-contact. +* [Chris Seaton](https://github.com/chrisseaton) ??? + If Petr is not available Chris can help or poke Petr to pay attention where it is needed. ### Special Thanks to +* [Jerry D'Antonio](https://github.com/jdantonio) for creating the gem * [Brian Durand](https://github.com/bdurand) for the `ref` gem * [Charles Oliver Nutter](https://github.com/headius) for the `atomic` and `thread_safe` gems * [thedarkone](https://github.com/thedarkone) for the `thread_safe` gem -and to the past maintainers +to the past maintainers * [Michele Della Torre](https://github.com/mighe) * [Pawe?? Obrok](https://github.com/obrok) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile --- old/Rakefile 2021-01-20 10:56:59.000000000 +0100 +++ new/Rakefile 2021-06-05 14:47:58.000000000 +0200 @@ -135,7 +135,7 @@ task :update_readme do Dir.chdir __dir__ do content = File.read(File.join('README.md')). - gsub(/\[([\w ]+)\]\(http:\/\/ruby-concurrency\.github\.io\/concurrent-ruby\/master\/.*\)/) do |_| + gsub(/\[([\w ]+)\]\(http:\/\/ruby-concurrency\.github\.io\/concurrent-ruby\/master\/.*\)/) do |_| case $1 when 'LockFreeLinkedSet' "{Concurrent::Edge::#{$1} #{$1}}" @@ -165,9 +165,9 @@ desc "* of #{name} into subdir #{name}" YARD::Rake::YardocTask.new(name) do |yard| yard.options.push( - '--output-dir', output_dir, - '--main', 'tmp/README.md', - *common_yard_options) + '--output-dir', output_dir, + '--main', 'tmp/README.md', + *common_yard_options) yard.files = ['./lib/concurrent-ruby/**/*.rb', './lib/concurrent-ruby-edge/**/*.rb', './ext/concurrent_ruby_ext/**/*.c', @@ -189,9 +189,9 @@ desc "* signpost for versions" YARD::Rake::YardocTask.new(:signpost) do |yard| yard.options.push( - '--output-dir', 'docs', - '--main', 'docs-source/signpost.md', - *common_yard_options) + '--output-dir', 'docs', + '--main', 'docs-source/signpost.md', + *common_yard_options) yard.files = ['no-lib'] end @@ -206,7 +206,7 @@ sh 'diff -r docs/ docs-copy/' do |ok, res| unless ok begin - STDOUT.puts 'Command failed. Continue? (y/n)' + STDOUT.puts "yard:#{name} is not properly generated and committed.", "Continue? (y/n)" input = STDIN.gets.strip.downcase end until %w(y n).include?(input) exit 1 if input == 'n' @@ -234,15 +234,13 @@ namespace :release do # Depends on environment of @pitr-ch - mri_version = '2.6.5' - jruby_version = 'jruby-9.2.9.0' - task :checks => "yard:#{current_yard_version_name}:uptodate" do Dir.chdir(__dir__) do sh 'test -z "$(git status --porcelain)"' do |ok, res| unless ok begin - STDOUT.puts 'Command failed. Continue? (y/n)' + status = `git status --porcelain` + STDOUT.puts 'There are local changes that you might want to commit.', status, 'Continue? (y/n)' input = STDIN.gets.strip.downcase end until %w(y n).include?(input) exit 1 if input == 'n' @@ -250,10 +248,10 @@ end sh 'git fetch' sh 'test $(git show-ref --verify --hash refs/heads/master) = ' + - '$(git show-ref --verify --hash refs/remotes/origin/master)' do |ok, res| + '$(git show-ref --verify --hash refs/remotes/origin/master)' do |ok, res| unless ok begin - STDOUT.puts 'Command failed. Continue? (y/n)' + STDOUT.puts 'Local master branch is not pushed to origin.', 'Continue? (y/n)' input = STDIN.gets.strip.downcase end until %w(y n).include?(input) exit 1 if input == 'n' @@ -270,6 +268,12 @@ Dir.chdir(__dir__) do old = ENV['RBENV_VERSION'] + mri_version = `ruby -e 'puts RUBY_VERSION'`.chomp + jruby_version = File.basename(ENV['CONCURRENT_JRUBY_HOME']) + + puts "Using following version:" + pp mri_version: mri_version, jruby_version: jruby_version + ENV['RBENV_VERSION'] = mri_version sh 'rbenv version' sh 'bundle exec rake spec:installed' @@ -292,12 +296,12 @@ task :ask do begin - STDOUT.puts 'Do you want to publish anything? (y/n)' + STDOUT.puts 'Do you want to publish anything now? (y/n)' input = STDIN.gets.strip.downcase end until %w(y n).include?(input) exit 1 if input == 'n' begin - STDOUT.puts 'Do you want to publish edge? (y/n)' + STDOUT.puts 'It will publish `concurrent-ruby`. Do you want to publish `concurrent-ruby-edge`? (y/n)' input = STDIN.gets.strip.downcase end until %w(y n).include?(input) publish_edge = input == 'y' @@ -326,9 +330,10 @@ desc '** print post release steps' task :post_steps do - puts 'Manually: create a release on GitHub with relevant changelog part' - puts 'Manually: send email same as release with relevant changelog part' - puts 'Manually: tweet' + # TODO: (petr 05-Jun-2021) automate and renew the process + # puts 'Manually: create a release on GitHub with relevant changelog part' + # puts 'Manually: send email same as release with relevant changelog part' + # puts 'Manually: tweet' end end end Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/concurrent-ruby/concurrent/collection/map/truffleruby_map_backend.rb new/lib/concurrent-ruby/concurrent/collection/map/truffleruby_map_backend.rb --- old/lib/concurrent-ruby/concurrent/collection/map/truffleruby_map_backend.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/concurrent-ruby/concurrent/collection/map/truffleruby_map_backend.rb 2021-06-05 14:47:58.000000000 +0200 @@ -0,0 +1,14 @@ +module Concurrent + + # @!visibility private + module Collection + + # @!visibility private + class TruffleRubyMapBackend < TruffleRuby::ConcurrentMap + def initialize(options = nil) + options ||= {} + super(initial_capacity: options[:initial_capacity], load_factor: options[:load_factor]) + end + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb new/lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb --- old/lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb 2021-01-20 10:56:59.000000000 +0100 +++ new/lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb 2021-06-05 14:47:58.000000000 +0200 @@ -30,7 +30,7 @@ if @queue[k] == item swap(k, @length) @length -= 1 - sink(k) + sink(k) || swim(k) @queue.pop else k += 1 @@ -126,12 +126,17 @@ # # @!visibility private def sink(k) + success = false + while (j = (2 * k)) <= @length do j += 1 if j < @length && ! ordered?(j, j+1) break if ordered?(k, j) swap(k, j) + success = true k = j end + + success end # Percolate up to maintain heap invariant. @@ -140,10 +145,15 @@ # # @!visibility private def swim(k) + success = false + while k > 1 && ! ordered?(k/2, k) do swap(k, k/2) k = k/2 + success = true end + + success end end end Binary files old/lib/concurrent-ruby/concurrent/concurrent_ruby.jar and new/lib/concurrent-ruby/concurrent/concurrent_ruby.jar differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/concurrent-ruby/concurrent/map.rb new/lib/concurrent-ruby/concurrent/map.rb --- old/lib/concurrent-ruby/concurrent/map.rb 2021-01-20 10:56:59.000000000 +0100 +++ new/lib/concurrent-ruby/concurrent/map.rb 2021-06-05 14:47:58.000000000 +0200 @@ -15,7 +15,10 @@ when Concurrent.on_cruby? require 'concurrent/collection/map/mri_map_backend' MriMapBackend - when Concurrent.on_rbx? || Concurrent.on_truffleruby? + when Concurrent.on_truffleruby? && defined?(::TruffleRuby::ConcurrentMap) + require 'concurrent/collection/map/truffleruby_map_backend' + TruffleRubyMapBackend + when Concurrent.on_truffleruby? || Concurrent.on_rbx? require 'concurrent/collection/map/atomic_reference_map_backend' AtomicReferenceMapBackend else @@ -114,7 +117,7 @@ # @return [true, false] true if deleted # @!macro map.atomic_method - + # def initialize(options = nil, &block) if options.kind_of?(::Hash) validate_options_hash!(options) @@ -143,8 +146,15 @@ end end + # Set a value with key + # @param [Object] key + # @param [Object] value + # @return [Object] the new value + def []=(key, value) + super + end + alias_method :get, :[] - # TODO (pitr-ch 30-Oct-2018): doc alias_method :put, :[]= # Get a value with key, or default_value when key is absent, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/concurrent-ruby/concurrent/promise.rb new/lib/concurrent-ruby/concurrent/promise.rb --- old/lib/concurrent-ruby/concurrent/promise.rb 2021-01-20 10:56:59.000000000 +0100 +++ new/lib/concurrent-ruby/concurrent/promise.rb 2021-06-05 14:47:58.000000000 +0200 @@ -250,6 +250,7 @@ realize(@promise_body) end else + compare_and_set_state(:pending, :unscheduled) @parent.execute end self diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/concurrent-ruby/concurrent/set.rb new/lib/concurrent-ruby/concurrent/set.rb --- old/lib/concurrent-ruby/concurrent/set.rb 2021-01-20 10:56:59.000000000 +0100 +++ new/lib/concurrent-ruby/concurrent/set.rb 2021-06-05 14:47:58.000000000 +0200 @@ -19,13 +19,19 @@ # # @see http://ruby-doc.org/stdlib-2.4.0/libdoc/set/rdoc/Set.html Ruby standard library `Set` - # @!macro internal_implementation_note SetImplementation = case when Concurrent.on_cruby? - # Because MRI never runs code in parallel, the existing - # non-thread-safe structures should usually work fine. - ::Set + # The CRuby implementation of Set is written in Ruby itself and is + # not thread safe for certain methods. + require 'monitor' + require 'concurrent/thread_safe/util/data_structures' + + class CRubySet < ::Set + end + + ThreadSafe::Util.make_synchronized_on_cruby CRubySet + CRubySet when Concurrent.on_jruby? require 'jruby/synchronized' @@ -33,6 +39,7 @@ class JRubySet < ::Set include JRuby::Synchronized end + JRubySet when Concurrent.on_rbx? @@ -41,7 +48,8 @@ class RbxSet < ::Set end - ThreadSafe::Util.make_synchronized_on_rbx Concurrent::RbxSet + + ThreadSafe::Util.make_synchronized_on_rbx RbxSet RbxSet when Concurrent.on_truffleruby? @@ -50,7 +58,7 @@ class TruffleRubySet < ::Set end - ThreadSafe::Util.make_synchronized_on_truffleruby Concurrent::TruffleRubySet + ThreadSafe::Util.make_synchronized_on_truffleruby TruffleRubySet TruffleRubySet else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb new/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb --- old/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb 2021-01-20 10:56:59.000000000 +0100 +++ new/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb 2021-06-05 14:47:58.000000000 +0200 @@ -32,6 +32,12 @@ @__Condition__ = ::ConditionVariable.new end + def initialize_copy(other) + super + @__Lock__ = ::Mutex.new + @__Condition__ = ::ConditionVariable.new + end + protected def synchronize @@ -60,6 +66,12 @@ @__Lock__ = ::Monitor.new @__Condition__ = @__Lock__.new_cond end + + def initialize_copy(other) + super + @__Lock__ = ::Monitor.new + @__Condition__ = @__Lock__.new_cond + end protected diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/concurrent-ruby/concurrent/synchronization/rbx_lockable_object.rb new/lib/concurrent-ruby/concurrent/synchronization/rbx_lockable_object.rb --- old/lib/concurrent-ruby/concurrent/synchronization/rbx_lockable_object.rb 2021-01-20 10:56:59.000000000 +0100 +++ new/lib/concurrent-ruby/concurrent/synchronization/rbx_lockable_object.rb 2021-06-05 14:47:58.000000000 +0200 @@ -12,6 +12,12 @@ @__owner__ = nil end + def initialize_copy(other) + super + @__Waiters__ = [] + @__owner__ = nil + end + protected def synchronize(&block) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb new/lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb --- old/lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb 2021-01-20 10:56:59.000000000 +0100 +++ new/lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb 2021-06-05 14:47:58.000000000 +0200 @@ -12,12 +12,37 @@ module Concurrent module ThreadSafe module Util + def self.make_synchronized_on_cruby(klass) + klass.class_eval do + def initialize(*args, &block) + @_monitor = Monitor.new + super + end + + def initialize_copy(other) + # make sure a copy is not sharing a monitor with the original object! + @_monitor = Monitor.new + super + end + end + + klass.superclass.instance_methods(false).each do |method| + klass.class_eval <<-RUBY, __FILE__, __LINE__ + 1 + def #{method}(*args) + monitor = @_monitor + monitor or raise("BUG: Internal monitor was not properly initialized. Please report this to the concurrent-ruby developers.") + monitor.synchronize { super } + end + RUBY + end + end + def self.make_synchronized_on_rbx(klass) klass.class_eval do private def _mon_initialize - @_monitor = Monitor.new unless @_monitor # avoid double initialisation + @_monitor ||= Monitor.new # avoid double initialisation end def self.new(*args) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/concurrent-ruby/concurrent/version.rb new/lib/concurrent-ruby/concurrent/version.rb --- old/lib/concurrent-ruby/concurrent/version.rb 2021-01-20 10:56:59.000000000 +0100 +++ new/lib/concurrent-ruby/concurrent/version.rb 2021-06-05 14:47:58.000000000 +0200 @@ -1,3 +1,3 @@ module Concurrent - VERSION = '1.1.8' + VERSION = '1.1.9' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2021-01-20 10:56:59.000000000 +0100 +++ new/metadata 2021-06-05 14:47:58.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: concurrent-ruby version: !ruby/object:Gem::Version - version: 1.1.8 + version: 1.1.9 platform: ruby authors: - Jerry D'Antonio @@ -10,7 +10,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2021-01-20 00:00:00.000000000 Z +date: 2021-06-05 00:00:00.000000000 Z dependencies: [] description: | Modern concurrency tools including agents, futures, promises, thread pools, actors, supervisors, and more. @@ -79,6 +79,7 @@ - lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb - lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb - lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb +- lib/concurrent-ruby/concurrent/collection/map/truffleruby_map_backend.rb - lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb - lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb - lib/concurrent-ruby/concurrent/concern/deprecation.rb