signal closing goroutine's output channel after the value is put on it, not right after the put is initiated