Call proper wait methods in future and generator.