random numbers, threads and reproducibility
Courageous
jkraska1 at san.rr.com
Sat May 19 11:46:18 EDT 2001
>> I am developing a small class framework for Genetic Algorithms in
>> Python, and wishing to create some threads, I face a problem:
>> One of the requirements I want to keep is reproducibility.
[snip astute observation regarding threads and randomness].
One way around this particular problem is to use cooperative
multithreading with your own scheduler. Without any preemptive
multitasking involved, the unfolding of your simulation will be
completely deterministic.
C//
More information about the Python-list
mailing list