endOp

stopAndDrainOps

Blocks new operations from starting, waits for the current ones to drain.
If someone already called it, returns immediately, which is currently unavoidable as
most of the users stop and close things right and left, and hope for the best.
stopAndWaitForOpsOnce asserts instead.