class Sentry::Hub

def with_background_worker_disabled(&block)

but it temporarily disables dispatching events to it
this doesn't do anything to the already initialized background worker
def with_background_worker_disabled(&block)
  original_background_worker_threads = configuration.background_worker_threads
  configuration.background_worker_threads = 0
  block.call
ensure
  configuration.background_worker_threads = original_background_worker_threads
end