Flow control with generators