Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-103833

Remove QAtomic*



    • Epic
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • None
    • Core: Threads, Other
    • None
    • remove-qatomic


      It seems the QAtomic classes have reached the end of their usefulness. The only non-std::atomic-backed implementation is bootstrap (ie. non-atomic), and only moc and automoc remain bootstrapped. So QAtomic is no longer useful as an abstraction of platform-specific atomic operations, esp. seeing as libstdc++, at least, already uses non-locked operations for std::atomic if the application is single-threaded.

      At the same time that QAtomic lost its defining meaning, upstream charges ahead and adds wait/notify semantics to every std::atomic in C++20. To gain feature parity, while maintaining compatibility with C++17, we'd need to re-imlement this functionality using futexes. This doesn't seem like a good use of our time.

      Therefore, this seems to be a good point time, before somone spends the time to implement QAtomic::wait(), to put QAtomic to rest.

      Target should be to remove the classes for Qt 7.

      Issues in this epic will define the roadmap until complete removal of the classes.


        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.



              cnn Qt Core & Network
              mmutz Marc Mutz
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              0 Vote for this issue
              3 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes