Audit usages of atomic operations on shared_ptrs

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Programmability
    • Service Arch 2024-04-29
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Atomic operations such as atomic_load on {{shared_ptr}}s are not lock-free, they need to take a global mutex in order to coordinate the pointer and refcount updates. This might not be obvious when looking at the code, since atomic load/stores of primitive types usually translate to a single CPU instruction and are comparatively cheap.

      We should audit these usages to find possible performance problems in hot paths and to explicitly declare whether we want the atomic operation to be lock free or not, e.g. invarianting on atomic_is_lock_free().

            Assignee:
            Unassigned
            Reporter:
            Daniel Gomez Ferro
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: