summaryrefslogtreecommitdiff
path: root/numpy/doc/glossary.py
diff options
context:
space:
mode:
authorDevin Jeanpierre <jeanpierreda@google.com>2016-02-22 08:00:42 -0800
committerDevin Jeanpierre <jeanpierreda@google.com>2016-02-22 08:00:42 -0800
commit9cdff27107b5feb0f6bfe5c408970716b19aa93d (patch)
treec162935e5b1157f1d45a0728f86fdde49ad27231 /numpy/doc/glossary.py
parente5c1ac175722bc58e74aac4e6d9138adf9260ec6 (diff)
downloadnumpy-9cdff27107b5feb0f6bfe5c408970716b19aa93d.tar.gz
BUG: Remove data race in mtrand: two threads could mutate the state.
E.g.: np.random.random_sample() uses the GIL for synchronization np.random.random_sample(1) releases the GIL and uses a separate lock. This means that both can run simultaneously, causing a data race when mutating the random number generator's state, which could lead to buffer overflow (from incrementing state->pos). The fix here is to always use the separate lock, so that exactly one thread at a time is mutating the random number generator's state.
Diffstat (limited to 'numpy/doc/glossary.py')
0 files changed, 0 insertions, 0 deletions