Method: ApiMaker::CommandResponse#with_thread

Defined in:
app/services/api_maker/command_response.rb

#with_thread(&blk) ⇒ Object



40
41
42
43
44
45
46
# File 'app/services/api_maker/command_response.rb', line 40

def with_thread(&blk)
  if Rails.env.test? || !threadding?
    yield
  else
    spawn_thread(&blk)
  end
end