brew vendor-gems: commit updates.
This commit is contained in:
parent
0d550ea3d2
commit
5fb975f8bc
@ -151,6 +151,7 @@ GEM
|
|||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
aarch64-linux
|
aarch64-linux
|
||||||
|
arm-linux
|
||||||
arm64-darwin
|
arm64-darwin
|
||||||
x86_64-darwin
|
x86_64-darwin
|
||||||
x86_64-linux
|
x86_64-linux
|
||||||
|
|||||||
@ -43,7 +43,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
|
|||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bigdecimal-3.1.9/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bigdecimal-3.1.9/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bindata-2.5.0/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bindata-2.5.0/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/coderay-1.1.3/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/coderay-1.1.3/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/diff-lcs-1.5.1/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/diff-lcs-1.5.1/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/docile-1.4.1/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/docile-1.4.1/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/elftools-1.3.1/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/elftools-1.3.1/lib")
|
||||||
|
|||||||
Binary file not shown.
@ -371,7 +371,7 @@ module Concurrent
|
|||||||
# @param [Float] timeout the maximum number of seconds to wait
|
# @param [Float] timeout the maximum number of seconds to wait
|
||||||
# @return [Boolean] true if all actions complete before timeout
|
# @return [Boolean] true if all actions complete before timeout
|
||||||
#
|
#
|
||||||
# @raise [Concurrent::TimeoutError] when timout is reached
|
# @raise [Concurrent::TimeoutError] when timeout is reached
|
||||||
#
|
#
|
||||||
# @!macro agent_await_warning
|
# @!macro agent_await_warning
|
||||||
def await_for!(timeout)
|
def await_for!(timeout)
|
||||||
@ -477,7 +477,7 @@ module Concurrent
|
|||||||
# @param [Array<Concurrent::Agent>] agents the Agents on which to wait
|
# @param [Array<Concurrent::Agent>] agents the Agents on which to wait
|
||||||
# @return [Boolean] true if all actions complete before timeout
|
# @return [Boolean] true if all actions complete before timeout
|
||||||
#
|
#
|
||||||
# @raise [Concurrent::TimeoutError] when timout is reached
|
# @raise [Concurrent::TimeoutError] when timeout is reached
|
||||||
# @!macro agent_await_warning
|
# @!macro agent_await_warning
|
||||||
def await_for!(timeout, *agents)
|
def await_for!(timeout, *agents)
|
||||||
raise Concurrent::TimeoutError unless await_for(timeout, *agents)
|
raise Concurrent::TimeoutError unless await_for(timeout, *agents)
|
||||||
@ -218,7 +218,7 @@ module Concurrent
|
|||||||
|
|
||||||
# @!method self.new(*args, &block)
|
# @!method self.new(*args, &block)
|
||||||
#
|
#
|
||||||
# Instanciate a new object and ensure proper initialization of the
|
# Instantiate a new object and ensure proper initialization of the
|
||||||
# synchronization mechanisms.
|
# synchronization mechanisms.
|
||||||
#
|
#
|
||||||
# @param [Array<Object>] args Zero or more arguments to be passed to the
|
# @param [Array<Object>] args Zero or more arguments to be passed to the
|
||||||
@ -113,7 +113,7 @@ module Concurrent
|
|||||||
# @option opts [Proc] :validator (nil) Optional proc used to validate new
|
# @option opts [Proc] :validator (nil) Optional proc used to validate new
|
||||||
# values. It must accept one and only one argument which will be the
|
# values. It must accept one and only one argument which will be the
|
||||||
# intended new value. The validator will return true if the new value
|
# intended new value. The validator will return true if the new value
|
||||||
# is acceptable else return false (preferrably) or raise an exception.
|
# is acceptable else return false (preferably) or raise an exception.
|
||||||
#
|
#
|
||||||
# @!macro deref_options
|
# @!macro deref_options
|
||||||
#
|
#
|
||||||
@ -1,4 +1,3 @@
|
|||||||
require 'logger'
|
|
||||||
require 'concurrent/atomic/atomic_reference'
|
require 'concurrent/atomic/atomic_reference'
|
||||||
|
|
||||||
module Concurrent
|
module Concurrent
|
||||||
@ -8,10 +7,12 @@ module Concurrent
|
|||||||
#
|
#
|
||||||
# @!visibility private
|
# @!visibility private
|
||||||
module Logging
|
module Logging
|
||||||
include Logger::Severity
|
# The same as Logger::Severity but we copy it here to avoid a dependency on the logger gem just for these 7 constants
|
||||||
|
DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN = 0, 1, 2, 3, 4, 5
|
||||||
|
SEV_LABEL = %w[DEBUG INFO WARN ERROR FATAL ANY].freeze
|
||||||
|
|
||||||
# Logs through {Concurrent.global_logger}, it can be overridden by setting @logger
|
# Logs through {Concurrent.global_logger}, it can be overridden by setting @logger
|
||||||
# @param [Integer] level one of Logger::Severity constants
|
# @param [Integer] level one of Concurrent::Concern::Logging constants
|
||||||
# @param [String] progname e.g. a path of an Actor
|
# @param [String] progname e.g. a path of an Actor
|
||||||
# @param [String, nil] message when nil block is used to generate the message
|
# @param [String, nil] message when nil block is used to generate the message
|
||||||
# @yieldreturn [String] a message
|
# @yieldreturn [String] a message
|
||||||
@ -23,7 +24,7 @@ module Concurrent
|
|||||||
end
|
end
|
||||||
logger.call level, progname, message, &block
|
logger.call level, progname, message, &block
|
||||||
rescue => error
|
rescue => error
|
||||||
$stderr.puts "`Concurrent.configuration.logger` failed to log #{[level, progname, message, block]}\n" +
|
$stderr.puts "`Concurrent.global_logger` failed to log #{[level, progname, message, block]}\n" +
|
||||||
"#{error.message} (#{error.class})\n#{error.backtrace.join "\n"}"
|
"#{error.message} (#{error.class})\n#{error.backtrace.join "\n"}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -33,8 +34,10 @@ end
|
|||||||
module Concurrent
|
module Concurrent
|
||||||
extend Concern::Logging
|
extend Concern::Logging
|
||||||
|
|
||||||
# @return [Logger] Logger with provided level and output.
|
# Create a simple logger with provided level and output.
|
||||||
def self.create_simple_logger(level = Logger::FATAL, output = $stderr)
|
def self.create_simple_logger(level = :FATAL, output = $stderr)
|
||||||
|
level = Concern::Logging.const_get(level) unless level.is_a?(Integer)
|
||||||
|
|
||||||
# TODO (pitr-ch 24-Dec-2016): figure out why it had to be replaced, stdlogger was deadlocking
|
# TODO (pitr-ch 24-Dec-2016): figure out why it had to be replaced, stdlogger was deadlocking
|
||||||
lambda do |severity, progname, message = nil, &block|
|
lambda do |severity, progname, message = nil, &block|
|
||||||
return false if severity < level
|
return false if severity < level
|
||||||
@ -52,7 +55,7 @@ module Concurrent
|
|||||||
|
|
||||||
output.print format "[%s] %5s -- %s: %s\n",
|
output.print format "[%s] %5s -- %s: %s\n",
|
||||||
Time.now.strftime('%Y-%m-%d %H:%M:%S.%L'),
|
Time.now.strftime('%Y-%m-%d %H:%M:%S.%L'),
|
||||||
Logger::SEV_LABEL[severity],
|
Concern::Logging::SEV_LABEL[severity],
|
||||||
progname,
|
progname,
|
||||||
formatted_message
|
formatted_message
|
||||||
true
|
true
|
||||||
@ -60,13 +63,15 @@ module Concurrent
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Use logger created by #create_simple_logger to log concurrent-ruby messages.
|
# Use logger created by #create_simple_logger to log concurrent-ruby messages.
|
||||||
def self.use_simple_logger(level = Logger::FATAL, output = $stderr)
|
def self.use_simple_logger(level = :FATAL, output = $stderr)
|
||||||
Concurrent.global_logger = create_simple_logger level, output
|
Concurrent.global_logger = create_simple_logger level, output
|
||||||
end
|
end
|
||||||
|
|
||||||
# @return [Logger] Logger with provided level and output.
|
# Create a stdlib logger with provided level and output.
|
||||||
|
# If you use this deprecated method you might need to add logger to your Gemfile to avoid warnings from Ruby 3.3.5+.
|
||||||
# @deprecated
|
# @deprecated
|
||||||
def self.create_stdlib_logger(level = Logger::FATAL, output = $stderr)
|
def self.create_stdlib_logger(level = :FATAL, output = $stderr)
|
||||||
|
require 'logger'
|
||||||
logger = Logger.new(output)
|
logger = Logger.new(output)
|
||||||
logger.level = level
|
logger.level = level
|
||||||
logger.formatter = lambda do |severity, datetime, progname, msg|
|
logger.formatter = lambda do |severity, datetime, progname, msg|
|
||||||
@ -93,7 +98,7 @@ module Concurrent
|
|||||||
|
|
||||||
# Use logger created by #create_stdlib_logger to log concurrent-ruby messages.
|
# Use logger created by #create_stdlib_logger to log concurrent-ruby messages.
|
||||||
# @deprecated
|
# @deprecated
|
||||||
def self.use_stdlib_logger(level = Logger::FATAL, output = $stderr)
|
def self.use_stdlib_logger(level = :FATAL, output = $stderr)
|
||||||
Concurrent.global_logger = create_stdlib_logger level, output
|
Concurrent.global_logger = create_stdlib_logger level, output
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -103,7 +108,7 @@ module Concurrent
|
|||||||
NULL_LOGGER = lambda { |level, progname, message = nil, &block| }
|
NULL_LOGGER = lambda { |level, progname, message = nil, &block| }
|
||||||
|
|
||||||
# @!visibility private
|
# @!visibility private
|
||||||
GLOBAL_LOGGER = AtomicReference.new(create_simple_logger(Logger::WARN))
|
GLOBAL_LOGGER = AtomicReference.new(create_simple_logger(:WARN))
|
||||||
private_constant :GLOBAL_LOGGER
|
private_constant :GLOBAL_LOGGER
|
||||||
|
|
||||||
def self.global_logger
|
def self.global_logger
|
||||||
Binary file not shown.
@ -19,7 +19,7 @@ module Concurrent
|
|||||||
#
|
#
|
||||||
# When a `Delay` is created its state is set to `pending`. The value and
|
# When a `Delay` is created its state is set to `pending`. The value and
|
||||||
# reason are both `nil`. The first time the `#value` method is called the
|
# reason are both `nil`. The first time the `#value` method is called the
|
||||||
# enclosed opration will be run and the calling thread will block. Other
|
# enclosed operation will be run and the calling thread will block. Other
|
||||||
# threads attempting to call `#value` will block as well. Once the operation
|
# threads attempting to call `#value` will block as well. Once the operation
|
||||||
# is complete the *value* will be set to the result of the operation or the
|
# is complete the *value* will be set to the result of the operation or the
|
||||||
# *reason* will be set to the raised exception, as appropriate. All threads
|
# *reason* will be set to the raised exception, as appropriate. All threads
|
||||||
@ -83,7 +83,7 @@ module Concurrent
|
|||||||
#
|
#
|
||||||
# This is a no-op on some pool implementation (e.g. the Java one). The Ruby
|
# This is a no-op on some pool implementation (e.g. the Java one). The Ruby
|
||||||
# pool will auto-prune each time a new job is posted. You will need to call
|
# pool will auto-prune each time a new job is posted. You will need to call
|
||||||
# this method explicitely in case your application post jobs in bursts (a
|
# this method explicitly in case your application post jobs in bursts (a
|
||||||
# lot of jobs and then nothing for long periods)
|
# lot of jobs and then nothing for long periods)
|
||||||
|
|
||||||
# @!macro thread_pool_executor_public_api
|
# @!macro thread_pool_executor_public_api
|
||||||
@ -27,7 +27,7 @@ module Concurrent
|
|||||||
# is received. This pattern has several issues. The thread itself is highly
|
# is received. This pattern has several issues. The thread itself is highly
|
||||||
# susceptible to errors during processing. Also, the thread itself must be
|
# susceptible to errors during processing. Also, the thread itself must be
|
||||||
# constantly monitored and restarted should it die. `SingleThreadExecutor`
|
# constantly monitored and restarted should it die. `SingleThreadExecutor`
|
||||||
# encapsulates all these bahaviors. The task processor is highly resilient
|
# encapsulates all these behaviors. The task processor is highly resilient
|
||||||
# to errors from within tasks. Also, should the thread die it will
|
# to errors from within tasks. Also, should the thread die it will
|
||||||
# automatically be restarted.
|
# automatically be restarted.
|
||||||
#
|
#
|
||||||
@ -148,7 +148,7 @@ module Concurrent
|
|||||||
if value = super # non-falsy value is an existing mapping, return it right away
|
if value = super # non-falsy value is an existing mapping, return it right away
|
||||||
value
|
value
|
||||||
# re-check is done with get_or_default(key, NULL) instead of a simple !key?(key) in order to avoid a race condition, whereby by the time the current thread gets to the key?(key) call
|
# re-check is done with get_or_default(key, NULL) instead of a simple !key?(key) in order to avoid a race condition, whereby by the time the current thread gets to the key?(key) call
|
||||||
# a key => value mapping might have already been created by a different thread (key?(key) would then return true, this elsif branch wouldn't be taken and an incorrent +nil+ value
|
# a key => value mapping might have already been created by a different thread (key?(key) would then return true, this elsif branch wouldn't be taken and an incorrect +nil+ value
|
||||||
# would be returned)
|
# would be returned)
|
||||||
# note: nil == value check is not technically necessary
|
# note: nil == value check is not technically necessary
|
||||||
elsif @default_proc && nil == value && NULL == (value = get_or_default(key, NULL))
|
elsif @default_proc && nil == value && NULL == (value = get_or_default(key, NULL))
|
||||||
@ -103,7 +103,7 @@ module Concurrent
|
|||||||
# - if parent is *rejected* the child will be *pending* (but will ultimately be *rejected*)
|
# - if parent is *rejected* the child will be *pending* (but will ultimately be *rejected*)
|
||||||
#
|
#
|
||||||
# Promises are executed asynchronously from the main thread. By the time a
|
# Promises are executed asynchronously from the main thread. By the time a
|
||||||
# child Promise finishes intialization it may be in a different state than its
|
# child Promise finishes initialization it may be in a different state than its
|
||||||
# parent (by the time a child is created its parent may have completed
|
# parent (by the time a child is created its parent may have completed
|
||||||
# execution and changed state). Despite being asynchronous, however, the order
|
# execution and changed state). Despite being asynchronous, however, the order
|
||||||
# of execution of Promise objects in a chain (or tree) is strictly defined.
|
# of execution of Promise objects in a chain (or tree) is strictly defined.
|
||||||
@ -193,7 +193,7 @@ module Concurrent
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# The `delay` value given at instanciation.
|
# The `delay` value given at instantiation.
|
||||||
#
|
#
|
||||||
# @return [Float] the initial delay.
|
# @return [Float] the initial delay.
|
||||||
def initial_delay
|
def initial_delay
|
||||||
@ -157,7 +157,7 @@ module Concurrent
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
members.each_with_index do |member, index|
|
members.each_with_index do |member, index|
|
||||||
clazz.send :remove_method, member if clazz.instance_methods.include? member
|
clazz.send :remove_method, member if clazz.instance_methods(false).include? member
|
||||||
clazz.send(:define_method, member) do
|
clazz.send(:define_method, member) do
|
||||||
@values[index]
|
@values[index]
|
||||||
end
|
end
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user