# File lib/memcache.rb, line 136
  def initialize(*args)
    servers = []
    opts = {}

    case args.length
    when 0 then # NOP
    when 1 then
      arg = args.shift
      case arg
      when Hash   then opts = arg
      when Array  then servers = arg
      when String then servers = [arg]
      else raise ArgumentError, 'first argument must be Array, Hash or String'
      end
    when 2 then
      servers, opts = args
    else
      raise ArgumentError, "wrong number of arguments (#{args.length} for 2)"
    end

    @evented = defined?(EM) && EM.reactor_running?
    opts = DEFAULT_OPTIONS.merge opts
    @namespace    = opts[:namespace]
    @readonly     = opts[:readonly]
    @multithread  = opts[:multithread] && !@evented
    @autofix_keys = opts[:autofix_keys]
    @timeout      = opts[:timeout]
    @failover     = opts[:failover]
    @logger       = opts[:logger]
    @no_reply     = opts[:no_reply]
    @check_size   = opts[:check_size]
    @namespace_separator = opts[:namespace_separator]
    @mutex        = Mutex.new if @multithread

    logger.info { "memcache-client #{VERSION} #{Array(servers).inspect}" } if logger

    Thread.current[:memcache_client] = self.object_id if !@multithread
    

    self.servers = servers
  end