class EM::Synchrony::ActiveRecord::TransactionManager

Public Class Methods

new(*args) click to toggle source
Calls superclass method
# File lib/em-synchrony/activerecord_4_2.rb, line 22
def initialize(*args)
  super
  @stack = Hash.new { |h, k| h[k] = [] }
end

Public Instance Methods

open_transactions() click to toggle source
# File lib/em-synchrony/activerecord_4_2.rb, line 31
def open_transactions
  _current_stack.size
end

Private Instance Methods

_current_stack() click to toggle source
# File lib/em-synchrony/activerecord_4_2.rb, line 56
def _current_stack
  @stack[Fiber.current.object_id]
end