A.J. Venter wrote:
Some other workaround that comes to my mind is to do something like
Randomize;
RandSeed := RandSeed * getpid;
This worked, cut the initial generation time from about 30 seconds down to
under 1, of course right now it's NOT platform independent at all so I will
need to enhance it but I like the direction of your thinking, combining
randseed with some virtually guaranteed unique value solves the problem.
Maybe you use a global variable and just add one for each randseed call. After all
the only thing that matters for the randseed, is that it is different.
BTW, I never would have guessed that the random number generator would have used
threadvars. I would have thought, that on app start you would set one randseed and
then call random from all threads.
Vincent.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal