[Collision.Response.Contact] Make contactId thread-safe
~~for thread-safety, and each thread/simu would have its own pool of contact id~~
~~An other solution would be to put a guard_lock/mutex each time the ids are accessed but it would share the same pool of contact id to the whole set of thread/simu~~
Make the counter of ContactId atomic. A side effect is to remove the ability to restore previous contactid which was destroyed and set in a side container. I dont think we really need to save some "ids" because we will never overrun the 64 bit integer IMO (18446744073709551615 is quite big 🙃)
By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).
Reviewers will merge this pull-request only if
- it builds with SUCCESS for all platforms on the CI.
- it does not generate new warnings.
- it does not generate new unit test failures.
- it does not generate new scene test failures.
- it does not break API compatibility.
- it is more than 1 week old (or has fast-merge label).
[ci-build][with-all-tests]
Error Win:
ContactIdentifier.h(39): error C2492: 'sofa::component::collision::response::contact::ContactIdentifier::cpt': data with thread storage duration may not have dll interface
[ci-build][with-all-tests]