On 2/12/06, Ross Bamford <rossrt / roscopeco.co.uk> wrote:
> (Incidentally, Jacob, Under 1.8 yours was testing about twice as fast as
> mine, but it seems to deadlock about half of the time? I have to
> interrupt after leaving it for up to a minute. I'm on Ruby 1.8.4
> i686-linux).

Hmm, while I didn't run into any deadlocks with my testing, I'm not
too surprised. I'm not very threading-savvy and could easily have made
some critical mistake. :)

I also realized that the implementation I posted to the list doesn't
rewind correctly. Currently it just drops back the @position marker,
but doesn't reset the @values array or generating block. This is bad
if the generator is rewound and the block should generate different
values on different runs (e.g. it's time dependent or sensitive to the
environment).

Jacob Fugal