Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-30706

Create specializations of AtomicWord<T> that are lock-free for eligible user define dtypes

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.12
    • Component/s: Internal Code
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Platforms 2017-09-11

      Description

      AtomicWord<T> is implemented in terms of std::atomic<T>. However, until C++17, there is no way to determine at compile time if std::atomic<T> has a lock-free implementation. This task is to provide a specialization of AtomicWord<T> for user-defined types T that is definitely lock free when the correspondingly sized integer type's atomic is also lock free.

      It should be a compile-time error to create an AtomicWord<T> for a user-defined type whose implementation would otherwise require locks. As part of this task, the implementer should also write runtime tests that confirm that the AtomicWord instantiations for integer types are actually lock free by using std::atomic::is_lock_free().

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: