Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

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