Add interface to wait for engine shutdown