Sha256: 36b20209495d7a49d57a27cdc4e27d687452b9e576788e2b7d7894d566801265

Contents?: true

Size: 705 Bytes

Versions: 1

Compression:

Stored size: 705 Bytes

Contents

require 'set'


module Orchestrator
    class Proxy
        COMMANDS = Set.new([:exec, :bind, :unbind, :debug, :ignore])
        
        def initialize(thread)
            @thread = thread

            @accept_connection = method :accept_connection
            @new_connection =    method :new_connection
            @bind_error =        method :bind_error

            @shutdown = true
            @edge_nodes = ::ThreadSafe::Cache.new # id => connection
            @req_map    = {} # connection => ::Set.new (defers)
            @req_map    = {}

            @signal_bind   = @thread.async method(:bind_actual)
            @signal_unbind = @thread.async method(:unbind_actual)
        end
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
orchestrator-1.0.3 lib/orchestrator/remote/proxy.rb