QSharedMemory & QSystemSemaphore in Qt 7: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Created page with "Category:QtCS2023 ==Session Summary== ==Session Owners== ==Notes==")
 
No edit summary
Line 2: Line 2:


==Session Summary==
==Session Summary==
 
What to do with QSharedMemory and QSystemSemaphore


==Session Owners==
==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


==Notes==
* 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 uses of 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

Revision as of 13:42, 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 uses of 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