class ActiveSupport::ExecutionWrapper

def complete!

Where possible, prefer +wrap+.

exactly once on the result of any call to +run!+.
Complete this in-flight execution. This method *must* be called
def complete!
  run_callbacks(:complete)
ensure
  self.class.active.delete Thread.current
end