[MUD-Dev] Threaded rand()

Ling K.L.Lo-94 at student.lut.ac.uk
Thu Jun 5 16:36:18 New Zealand Standard Time 1997


On Wed, 4 Jun 1997, Jon A. Lambert wrote:

> Chris or anyone:
> 
> Does multi-threading have any affects on seeds used in the random
> generator.  Does anyone know if this is truly thread safe?
> 
> JL

Not as far as I know, for SunOS and the linux.  Could use rand_r() and
provide the seed each time.  I think you might wanna provide your own
random number generator (I know it's a fine art but I'm sure a good
algorithm book would have a couple).

  |    Anyone
_O_O_  Freshwater fish since 1976




More information about the MUD-Dev mailing list