excilys/gatling — Issue #321: Implement a circular feeder
Author: slandelle
Created: 2011-12-22 09:08:57+00:00
State: open

To way of doing this :
* use a Stream
val listToRepeat:List[Foo]
val forever:Stream[Foo] = for(x<-Stream.continually; y<-listToRepeat) yield y

* use a RingBuffer (much better as the sequence doesn't grow) :
https://github.com/twitter/util/blob/master/util-core/src/main/scala/com/twitter/util/RingBuffer.scala