On Tue, Sep 11, 2001 at 12:06:13AM -0500, William A. Rowe, Jr. wrote:
>...
> > where the code uses a pid (getpid()) you need to use a concatenation of
> > pid and thread id.
> >
> > otherwise you violate some of the uniqueness guarantees.
> >
> > i just didn't bother trying to figure out how to get a thread id in any
> > sort of portable way and left that to folks who actually wanted the module
> > on those platforms.
> >
> > (this is actually mentioned in the comments near the top of the file
> > describing how it works and the assumptions made.)
> 
> As I've read.  IIRC there are some other subtle issues with the size of the
> unique key.  Be careful that we keep everyone in sync.
> 
> Seems that we now have 64 bit cpu's with potentially 64 bit pids.  This adds
> to the equation, it looks like we need to cut over to those extra four bytes
> across all platforms.

Oh, screw all that mess :-)  Just use a UUID for the unique id. It has lots
of bits, and it is already unique (by definition and without work).

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Reply via email to