[fpc-devel] Fwd: Re: fpc-devel Digest, Vol 175, Issue 29

Sven Barth pascaldragon at googlemail.com
Sat Dec 22 20:18:54 CET 2018


Am Sa., 22. Dez. 2018, 17:38 hat Bart <bartjunk64 at gmail.com> geschrieben:

> On Sat, Dec 22, 2018 at 1:03 PM Franz Müller <bupa at gmx.at> wrote:
>
> > But maybe there is an easy way to save the state of the random number
> generator routine before sorting and to restore it when the sort is done?
>
> Save RandSeed and restore it after you're done with your calls to Random
>

Please note that this is not threadsafe as another thread running the same
or even different code could poke around in the RNG's state as well.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20181222/8cbce8ce/attachment.html>


More information about the fpc-devel mailing list