Jonas Maebe wrote:
Mark Morgan Lloyd wrote:
Could I ask for clarification of this please. Are you saying that
Random() will crash if called simultaneously by multiple threads, or
that it will return suboptimal results?

It's undefined. The current implementation won't crash, but the results will indeed be suboptimal.

If, as an example, I have two threads doing network or comms jobs and I
want to introduce jitter in the retries, does that mean that I have to
put Random() into a critical section?

Yes.

Thanks Jonas, noted.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to