Message77401
The uuid module uses a single global buffer for storing random values
obtained from the system. This can (and does) cause non-uniqueness of
generated id's when using the uuid4 function in a multithreaded program.
The following snippet shows the problem - _buffer is the global buffer:
# When the system provides a version-4 UUID generator, use it.
if _uuid_generate_random:
_uuid_generate_random(_buffer)
return UUID(bytes=_buffer.raw) |
|
Date |
User |
Action |
Args |
2008-12-09 10:13:33 | mortenab | set | recipients:
+ mortenab |
2008-12-09 10:13:33 | mortenab | set | messageid: <1228817613.61.0.835491086026.issue4607@psf.upfronthosting.co.za> |
2008-12-09 10:13:32 | mortenab | link | issue4607 messages |
2008-12-09 10:13:32 | mortenab | create | |
|