Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^4: Generate a unique ID

by BrowserUk (Pope)
on Nov 15, 2010 at 20:41 UTC ( #871575=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Generate a unique ID
in thread Generate a unique ID

Thanks. I hadn't seen UUID. But I don't see installing it is possible on windows?

As for your testing, if you generate them sequentially, there is probably little danger of collision, but what happens if two (or more) concurrent processes or threads call it at the same time?

My program is threaded and different threads will be generating their own spill files concurrently so this is a significant possibility. And most "UUID" simulate the "clock sequence" value of the spec. which is meant to be initialised once per system/NIC card change using per process globals derived from the same time source as they use for the time component, rendering its purpose negated.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re^4: Generate a unique ID

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://871575]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2014-07-10 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (213 votes), past polls