Add wait() variant that returns a callback.