module DSLKit::InstanceExec

def instance_exec_fetch_symbol

available create a new one, that will be pushed into the pool later.
Fetch a symbol from a pool in thread save way. If no more symbols are
def instance_exec_fetch_symbol
  @@mutex.synchronize do
    if InstanceExec.pool.empty?
      InstanceExec.count += 1
      symbol = :"__instance_exec_#{InstanceExec.count}__"
    else
      symbol = InstanceExec.pool.shift
    end
    return symbol
  end
end