Hi Daniel
I did some testing using the InMemory driver and yes, I got duplicate IDs even with a few threads. It looks like Clarion’s random generator is not that good. I suspect that in some cases it returns the same value to different threads.
To fix this, I changed the code to call BCryptGenRandom and with that change I was able to generate 1,000,000 IDs in 100 threads (10,000 IDs each) without collisions.
Please download the updated version from GitHub. You’ll also need to download bcryptrandom.lib and save it in accessory\lib or the app folder.
Thanks for reporting this. I’ll appreciate your feedback if you try the updated version
Regards,
Carlos