I need to program a parallel system for assigning globally unique ID numbers in FOAM. I'm thinking of a system where a master process would be responsible for generating a new free number, and giving them to a process upon request. Sort of like a sentinel from which all processes can ask for a unique ID number, do their work, and come back to ask another ID number, as many times as no more ID numbers are needed. Preferably so that processes don't have to wait for others to complete. Suggestions on how to do this?