GRAYBYTE WORDPRESS FILE MANAGER3856

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/alt/ruby30/share/ruby/drb/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/alt/ruby30/share/ruby/drb//weakidconv.rb
# frozen_string_literal: false
require_relative 'drb'
require 'monitor'

module DRb

  # To use WeakIdConv:
  #
  #  DRb.start_service(nil, nil, {:idconv => DRb::WeakIdConv.new})

  class WeakIdConv < DRbIdConv
    class WeakSet
      include MonitorMixin
      def initialize
        super()
        @immutable = {}
        @map = ObjectSpace::WeakMap.new
      end

      def add(obj)
        synchronize do
          begin
            @map[obj] = self
          rescue ArgumentError
            @immutable[obj.__id__] = obj
          end
          return obj.__id__
        end
      end

      def fetch(ref)
        synchronize do
          @immutable.fetch(ref) {
            @map.each { |key, _|
              return key if key.__id__ == ref
            }
            raise RangeError.new("invalid reference")
          }
        end
      end
    end

    def initialize()
      super()
      @weak_set = WeakSet.new
    end

    def to_obj(ref) # :nodoc:
      return super if ref.nil?
      @weak_set.fetch(ref)
    end

    def to_id(obj) # :nodoc:
      return @weak_set.add(obj)
    end
  end
end

# DRb.install_id_conv(WeakIdConv.new)

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 17 2024 08:38:31
root / linksafe
0755
acl.rb
4.61 KB
June 26 2024 13:55:18
root / linksafe
0644
drb.rb
57.486 KB
June 26 2024 13:55:18
root / linksafe
0644
eq.rb
0.269 KB
June 26 2024 13:55:18
root / linksafe
0644
extserv.rb
0.816 KB
June 26 2024 13:55:18
root / linksafe
0644
extservm.rb
1.745 KB
June 26 2024 13:55:18
root / linksafe
0644
gw.rb
3.005 KB
June 26 2024 13:55:18
root / linksafe
0644
invokemethod.rb
0.759 KB
June 26 2024 13:55:18
root / linksafe
0644
observer.rb
0.655 KB
June 26 2024 13:55:18
root / linksafe
0644
ssl.rb
11.518 KB
June 26 2024 13:55:18
root / linksafe
0644
timeridconv.rb
2.161 KB
June 26 2024 13:55:18
root / linksafe
0644
unix.rb
2.776 KB
June 26 2024 13:55:18
root / linksafe
0644
version.rb
0.034 KB
June 26 2024 13:55:18
root / linksafe
0644
weakidconv.rb
1.122 KB
June 26 2024 13:55:18
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF