Async::RedisSourceAsyncRedisClient

class Client

Nested

Definitions

def self.open(*arguments, **options, &block)

Implementation

def self.open(*arguments, **options, &block)
	client = self.new(*arguments, **options)
	
	return client unless block_given?
	
	Async do |task|
		begin
			yield client, task
		ensure
			client.close
		end
	end.wait
end