Synchronous flushing now waits for existing threads to finish