class Rdsck::Async::Redis::Client

Public Instance Methods

psubscribe(*channels) { |context| ... } click to toggle source
# File lib/nchan_tools/rdsck.rb, line 27
def psubscribe(*channels)                                                                                                                                             
  context = Async::Redis::Context::Psubscribe.new(@pool, channels)                                                                                                            
  return context unless block_given?                                                                                                                           
  begin                                                                                                                                                        
    yield context                                                                                                                                        
  ensure                                                                                                                                                       
    context.close                                                                                                                                        
  end                                                                                                                                                          
end