QSharedMemory & QSystemSemaphore in Qt 7: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
m (→‎Notes: Minor mark-up tweak and typo fix)
Line 16: Line 16:
* We'll add the deprecation markers now, with a trigger time in the future
* We'll add the deprecation markers now, with a trigger time in the future
** Markers can be disabled with a macro (opt-out)
** Markers can be disabled with a macro (opt-out)
** Current uses of shouldn't be affected - any issues that you have are ones you've always had
** Current users shouldn't be affected – any issues that you have are ones you've always had
* We'll link to a doc page explaining how to replace QSharedMemory
* We'll link to a doc page explaining how to replace QSharedMemory
** Use QFile::map for simple sharing of memory
** Use QFile::map for simple sharing of memory

Revision as of 14:44, 1 December 2023


Session Summary

What to do with QSharedMemory and QSystemSemaphore

Session Owners

Thiago Macieira

Notes

(Note: recreated from memory, note taker had a laptop trouble and the file wasn't saved) Add link to list archive

  • Thiago proposed deprecating now and moving to Qt6CoreCompat in Qt 7
    • No replacement class
    • Fabian has volunteered to investigate a replacement API before Qt 6.10
  • We'll add the deprecation markers now, with a trigger time in the future
    • Markers can be disabled with a macro (opt-out)
    • Current users shouldn't be affected – any issues that you have are ones you've always had
  • We'll link to a doc page explaining how to replace QSharedMemory
    • Use QFile::map for simple sharing of memory
    • Update as we learn more about use-cases
    • Ask for contact if use-case isn't taken into account
  • Known uses:
    • Biggest user of QSharedMemory is QtSingleApplication
      • Multiple different versions out there
      • Thiago volunteers to fix it
    • Use D-Bus on Linux, figure out what to do elsewhere
    • qtwayland has one use of QSharedMemory too
    • Sharing of large data sets to avoid serialisation
    • Shared images (qtdeclarative)
    • Androidtestrunner (single-application exclusion)
  • WINE implements Windows semantics on Unix; we could investigate
  • memfd is the "correct" solution on Linux and FreeBSD
    • similar enough to Windows semantics (disappears on last close)
    • not portable elsewhere