Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r266:4acf3f474301 Date: 2013-06-24 17:17 +0200 http://bitbucket.org/pypy/stmgc/changeset/4acf3f474301/
Log: Give different seeds to each thread. diff --git a/c4/demo_random.c b/c4/demo_random.c --- a/c4/demo_random.c +++ b/c4/demo_random.c @@ -242,7 +242,7 @@ void setup_thread() { int i; - td.thread_seed = default_seed; + td.thread_seed = default_seed++; td.steps_left = STEPS_PER_THREAD; td.interruptible = 0; @@ -479,7 +479,8 @@ // seed changes daily // a bit pointless for now.. - default_seed = time(NULL) / 3600 / 24; + default_seed = time(NULL); + default_seed -= (default_seed % (3600 * 24)); for (i = 0; i < SHARED_ROOTS; i++) { if (i % 3 == 0) { _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit