|Did you know ...||Search Documentation:|
|library(gensym): Generate unique identifiers|
Gensym (Generate Symbols) is an old library for generating unique symbols (atoms). Such symbols are generated from a base atom which gets a sequence number appended. Of course there is no guarantee that‘catch22' is not an already defined atom and therefore one must be aware these atoms are only unique in an isolated context.
The SWI-Prolog gensym library is thread-safe. The sequence numbers are global over all threads and therefore generated atoms are unique over all threads.