Methods
Attributes
[RW] | client | |
[R] | mutex |
Public Class methods
[ show source ]
# File lib/phusion_passenger/analytics_logger.rb, line 333 333: def initialize 334: @mutex = Mutex.new 335: @refcount = 1 336: end
Public Instance methods
[ show source ]
# File lib/phusion_passenger/analytics_logger.rb, line 338 338: def disconnect(check_error_response = false) 339: # TODO: implement check_error_response support 340: @client.close if @client 341: end
[ show source ]
# File lib/phusion_passenger/analytics_logger.rb, line 343 343: def ref 344: @refcount += 1 345: end
[ show source ]
# File lib/phusion_passenger/analytics_logger.rb, line 354 354: def synchronize 355: @mutex.synchronize do 356: yield 357: end 358: end
[ show source ]
# File lib/phusion_passenger/analytics_logger.rb, line 347 347: def unref 348: @refcount -= 1 349: if @refcount == 0 350: disconnect 351: end 352: end