[erlang-questions] erlang:phash2(make_ref(), 1 bsl 32)

Per Melin <>
Thu May 8 13:02:03 CEST 2008

2008/5/8 Darren New <>:

> I'm no expert, but my understanding is that make_ref() doesn't make a
> particularly unique reference.

You're right. But for what I need in this particular case it's perfect. It
only has to be unique per node, and only a few million times. I could even
use a counter, but then I'd have to have a process on each node just to own
the counter.

I'll use some combination of make_ref() and now() and it'll be fine. I just
wonder if it isn't a weakness in how phash2 works with refs?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080508/921ec950/attachment.html>

More information about the erlang-questions mailing list