I suspect you don't want to spawn maxIteration parallel gofuncs here, you probably want one gofunc with a for loop inside it (otherwise you're relying on them happening to run in order on the channel writes, which isn't guaranteed)