[Home] [Groups] - Message: [Prev in Group] [Next in Group]

nu.kanga.list.mud-dev

551: Re: [MUD-Dev] Threaded rand()

[Full Header] [Plain Text]
From: Ling <K.L.Lo-94@student.lut.ac.uk>
Newsgroups: nu.kanga.list.mud-dev
Date: Thu, 5 Jun 1997 16:36:18 +0100 (BST)
References: [1]
Organization: Kanga.Nu
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