Actually, you can ensure it, and the original spec for UUIDs shows how. I
don't recall all the details, but it's basically:
There are 6 bits of UUID version and type information.
The last 48 bits are the MAC address. All are guaranteed unique by the
manufacturer, so the problem of uniqueness is now restricted to a single
machine.
There are 14 bits called the "clock sequence". IIRC, it's intended that
each process (or thread) on the machine that produces UUIDs gets a unique
clock sequence number either from the OS or from a piece of specialized
hardware.
This leaves 60 bits for the time, which represent the absolute time of UUID
creation in 100s of nanoseconds. That's good for about 3500 years. (You're
right that the algorithm breaks down after that. Sue me
If a thread is asked to generate more than 1 UUID every 100 nanoseconds, it
can either ask for a new clock sequence, or just wait.
I've written UUID generators that follow this algorithm (more or less
closely), and they work well enough. Clearly .NET doesn't, though I suppose
it could be doing so and then doing a reversible encryption of the result.