Skip to content

ID Generator

Allen Ray edited this page Aug 14, 2020 · 3 revisions

The motivation behind this tool was that I needed a thread-safe way to essentially increment an integer for use as a key in a map.

idgen := pixelutils.NewIDGen()

id := idgen.Gen()

Gen() can be called from multiple different threads.

Clone this wiki locally