MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
Re: [MUD-Dev] Rooms, 3D arrays, etc.
> From: clawrenc#cup,hp.com
> at 08:34 PM, "Jon A. Lambert" <jlsysinc#ix,netcom.com> said:
>
> >Does multi-threading have any affects on seeds used in the random
> >generator. Does anyone know if this is truly thread safe?
>
>
> The standard approach is to make private rand() functions for each
> feature. This has the benefit of allowing the choice of algorithm for
> each rand() function to be tailored to the task. The problem is that
> it does not solve the problem if your feature may be called from
> multiple threads (eg multiple threads querying/generating your
> landscape). Next up is to use per-feature specific rand() functions
> and then add some sort of rand() context to each thread (cf rand
> object) which guarantees the sequence.
Yes. This would seem to solve the problem. Generate your own seed table
for use with the terrain generator. If you are generating terrain
as part of bootup or "area" load this may well end up a single-threaded
version of rand(). Other functions whose 'normal' use of rand() wouldn't
need the same attention, except for race conditions.
-
"If I'd known it was harmless, I would have killed it myself"
*- Through a Scanner Darkly - PKD -*
----------
- Thread context:
- Re: [MUD-Dev] Physical Space Representation, (continued)
- Re: [MUD-Dev] Rooms, 3D arrays, etc.,
Jeff Kesselman jeffk#tenetwork,com, Thu 05 Jun 1997, 12:51 GMT
- Re: [MUD-Dev] Rooms, 3D arrays, etc.,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Thu 05 Jun 1997, 21:47 GMT
- Re: [MUD-Dev] Rooms, 3D arrays, etc.,
Jeff Kesselman jeffk#tenetwork,com, Fri 06 Jun 1997, 12:00 GMT
- Re: [MUD-Dev] Rooms, 3D arrays, etc.,
Jon A. Lambert jlsysinc#ix,netcom.com, Sat 07 Jun 1997, 08:12 GMT
- Important: Posting requirements,
coder coder#ibm,net, Wed 28 May 1997, 11:32 GMT
- Re: [MUD-Dev] Conventions (was RP thesis),
Jeff Kesselman jeffk#tenetwork,com, Wed 28 May 1997, 09:53 GMT
- Re: [MUD-Dev] Levels and Goals [was Alright..IF your gonan do DESIESE],
Jeff Kesselman jeffk#tenetwork,com, Wed 28 May 1997, 02:30 GMT
[ Other Periods
| Other mailing lists
| Search
]