[Python-checkins] CVS: python/dist/src/Misc NEWS,1.105,1.106
Tim Peters
tim_one@users.sourceforge.net
Wed, 24 Jan 2001 22:23:20 -0800
Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv11428/python/dist/src/Misc
Modified Files:
NEWS
Log Message:
Fix bugs introduced by rewrite (in particular, time-based initialization
got broken). Also added new method .jumpahead(N). This finally gives us
a semi-decent answer to how Python's RNGs can be used safely and efficiently
in multithreaded programs (although it requires the user to use the new
machinery!).
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.105
retrieving revision 1.106
diff -C2 -r1.105 -r1.106
*** NEWS 2001/01/25 03:36:26 1.105
--- NEWS 2001/01/25 06:23:18 1.106
***************
*** 9,13 ****
the now-deprecated whrandom.py. See the docs for details. random.py
also supports new functions getstate() and setstate(), for saving
! and restoring the internal state of all the generators.
--- 9,18 ----
the now-deprecated whrandom.py. See the docs for details. random.py
also supports new functions getstate() and setstate(), for saving
! and restoring the internal state of the generator; and jumpahead(n),
! for quickly forcing the internal state to be the same as if n calls to
! random() had been made. The latter is particularly useful for multi-
! threaded programs, creating one instance of the random.Random() class for
! each thread, then using .jumpahead() to force each instance to use a
! non-overlapping segment of the full period.
***************
*** 108,117 ****
default.
! You can force use of the fgets() method by #define'ing
! USE_FGETS_IN_GETLINE at build time (it may be faster than
getc_unlocked()).
! You can force fgets() not to be used by #define'ing
! DONT_USE_FGETS_IN_GETLINE (this is the first thing to try if std test
test_bufio.py fails -- and let us know if it does!).
--- 113,122 ----
default.
! You can force use of the fgets() method by #define'ing
! USE_FGETS_IN_GETLINE at build time (it may be faster than
getc_unlocked()).
! You can force fgets() not to be used by #define'ing
! DONT_USE_FGETS_IN_GETLINE (this is the first thing to try if std test
test_bufio.py fails -- and let us know if it does!).