-
Notifications
You must be signed in to change notification settings - Fork 6
Description
At the moment local_mut and multipole_mut are implemented as a part of the DataAccess and DataAccess multi traits, they operate using interior mutability of KiFmm structs. However, this is considered an anti-pattern as of the most recent RF - as if multiple mutable references are held and written to behaviour is undefined, this isn't currently an issue as access via these methods is rare across the library and also single threaded in core code.
A choice has to be made to either make safe versions of these functions, by wrapping in a refcell or related threadsafe object the returned raw pointer or remove these methods altogether, or at the very least not to expose them to the public API so that users do not accidentally cause undefined behaviour.