Share iterator between users

Is there a way to share an iterator between gatling users (“threads”)?

What I’m seeing right now is that if I have something like:
val it = Iterator.continually(Seq(1,2,3))

And I pull values from this iterator (e.g., it.next), each gatling user will start at 1 and circulate to 3, rather than the first user starting at 1, the second user at 2, etc., as would happen if I used a feed. How can I simulate the feed behavior without using a feed?

Hi Jonathan,

You can define your values in global feeder and loop thru these values in your scenario

val feeder = Iterator.continually(Map(“values”->List(1,2,3)))

val scn = scenario(“scn”).feed(feeder) {
foreach("${values}", “value”) {

… your exec here using ${value} variable

}
}