X7ROOT File Manager
Current Path:
/opt/alt/ruby32/share/gems/gems/bundler-2.4.19/lib/bundler
opt
/
alt
/
ruby32
/
share
/
gems
/
gems
/
bundler-2.4.19
/
lib
/
bundler
/
ðŸ“
..
📄
build_metadata.rb
(1.2 KB)
📄
capistrano.rb
(883 B)
ðŸ“
cli
📄
cli.rb
(41 KB)
ðŸ“
compact_index_client
📄
compact_index_client.rb
(3.36 KB)
📄
constants.rb
(224 B)
📄
current_ruby.rb
(2.43 KB)
📄
definition.rb
(32.33 KB)
📄
dependency.rb
(3.11 KB)
📄
deployment.rb
(3.19 KB)
📄
deprecate.rb
(876 B)
📄
digest.rb
(2.16 KB)
📄
dsl.rb
(19.97 KB)
📄
endpoint_specification.rb
(3.65 KB)
📄
env.rb
(5.01 KB)
📄
environment_preserver.rb
(1.94 KB)
📄
errors.rb
(5.17 KB)
📄
feature_flag.rb
(1.79 KB)
ðŸ“
fetcher
📄
fetcher.rb
(11.19 KB)
📄
force_platform.rb
(557 B)
📄
friendly_errors.rb
(3.75 KB)
📄
gem_helper.rb
(6.89 KB)
📄
gem_helpers.rb
(4.08 KB)
📄
gem_tasks.rb
(138 B)
📄
gem_version_promoter.rb
(4.76 KB)
📄
graph.rb
(4.99 KB)
📄
index.rb
(4.14 KB)
📄
injector.rb
(10.08 KB)
📄
inline.rb
(2.47 KB)
ðŸ“
installer
📄
installer.rb
(10.25 KB)
📄
lazy_specification.rb
(5.35 KB)
📄
lockfile_generator.rb
(2.18 KB)
📄
lockfile_parser.rb
(7.01 KB)
ðŸ“
man
📄
match_metadata.rb
(290 B)
📄
match_platform.rb
(583 B)
📄
match_remote_metadata.rb
(863 B)
📄
mirror.rb
(5.78 KB)
ðŸ“
plugin
📄
plugin.rb
(11.25 KB)
📄
process_lock.rb
(686 B)
📄
remote_specification.rb
(3.71 KB)
ðŸ“
resolver
📄
resolver.rb
(14.62 KB)
📄
retry.rb
(1.61 KB)
📄
ruby_dsl.rb
(961 B)
📄
ruby_version.rb
(4.17 KB)
📄
rubygems_ext.rb
(10.88 KB)
📄
rubygems_gem_installer.rb
(5.24 KB)
📄
rubygems_integration.rb
(15.82 KB)
📄
runtime.rb
(10.15 KB)
📄
safe_marshal.rb
(597 B)
📄
self_manager.rb
(4.76 KB)
ðŸ“
settings
📄
settings.rb
(13.19 KB)
📄
setup.rb
(963 B)
📄
shared_helpers.rb
(10.76 KB)
📄
similarity_detector.rb
(1.84 KB)
ðŸ“
source
📄
source.rb
(2.98 KB)
📄
source_list.rb
(6.18 KB)
📄
source_map.rb
(2.17 KB)
📄
spec_set.rb
(5.08 KB)
📄
stub_specification.rb
(2.79 KB)
ðŸ“
templates
ðŸ“
ui
📄
ui.rb
(255 B)
📄
uri_credentials_filter.rb
(1.28 KB)
📄
uri_normalizer.rb
(715 B)
ðŸ“
vendor
📄
vendored_fileutils.rb
(101 B)
📄
vendored_persistent.rb
(270 B)
📄
vendored_pub_grub.rb
(99 B)
📄
vendored_thor.rb
(180 B)
📄
vendored_tsort.rb
(93 B)
📄
vendored_uri.rb
(89 B)
📄
version.rb
(260 B)
📄
vlad.rb
(468 B)
📄
worker.rb
(2.85 KB)
📄
yaml_serializer.rb
(2.36 KB)
Editing: worker.rb
# frozen_string_literal: true module Bundler class Worker POISON = Object.new class WrappedException < StandardError attr_reader :exception def initialize(exn) @exception = exn end end # @return [String] the name of the worker attr_reader :name # Creates a worker pool of specified size # # @param size [Integer] Size of pool # @param name [String] name the name of the worker # @param func [Proc] job to run in inside the worker pool def initialize(size, name, func) @name = name @request_queue = Thread::Queue.new @response_queue = Thread::Queue.new @func = func @size = size @threads = nil @previous_interrupt_handler = nil end # Enqueue a request to be executed in the worker pool # # @param obj [String] mostly it is name of spec that should be downloaded def enq(obj) create_threads unless @threads @request_queue.enq obj end # Retrieves results of job function being executed in worker pool def deq result = @response_queue.deq raise result.exception if result.is_a?(WrappedException) result end def stop stop_threads end private def process_queue(i) loop do obj = @request_queue.deq break if obj.equal? POISON @response_queue.enq apply_func(obj, i) end end def apply_func(obj, i) @func.call(obj, i) rescue Exception => e # rubocop:disable Lint/RescueException WrappedException.new(e) end # Stop the worker threads by sending a poison object down the request queue # so as worker threads after retrieving it, shut themselves down def stop_threads return unless @threads @threads.each { @request_queue.enq POISON } @threads.each(&:join) remove_interrupt_handler @threads = nil end def abort_threads Bundler.ui.debug("\n#{caller.join("\n")}") @threads.each(&:exit) exit 1 end def create_threads creation_errors = [] @threads = Array.new(@size) do |i| Thread.start { process_queue(i) }.tap do |thread| thread.name = "#{name} Worker ##{i}" if thread.respond_to?(:name=) end rescue ThreadError => e creation_errors << e nil end.compact add_interrupt_handler unless @threads.empty? return if creation_errors.empty? message = "Failed to create threads for the #{name} worker: #{creation_errors.map(&:to_s).uniq.join(", ")}" raise ThreadCreationError, message if @threads.empty? Bundler.ui.info message end def add_interrupt_handler @previous_interrupt_handler = trap("INT") { abort_threads } end def remove_interrupt_handler return unless @previous_interrupt_handler trap "INT", @previous_interrupt_handler end end end
Upload File
Create Folder