https://bugs.kde.org/show_bug.cgi?id=466559

Harald Sitter <sit...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/plas
                   |                            |ma/discover/-/commit/90f329
                   |                            |899d67924c5c3c392a528c87251
                   |                            |cd1b7c9

--- Comment #9 from Harald Sitter <sit...@kde.org> ---
Git commit 90f329899d67924c5c3c392a528c87251cd1b7c9 by Harald Sitter.
Committed on 30/08/2024 at 05:36.
Pushed by sitter into branch 'master'.

flatpak: merge transactions into a single transaction with multiple operations

this change is comprised of two parts:

This is a new object that seeks to merge multiple discover transactions
into a single flatpak transaction (with multiple operations as part of
it).
The way this works is that instead of starting FlatpakJobTransactions
right away we schedule them in the merger. The merger will then dispatch
all transactions that have been made in a single eventloop run into one
backing transaction.

The threading code has been largely redone to deal with it being
comprised of multiple operations on the backing side. The most
interesting bit of code here is inside setCurrentRef and handles the
transition from one ref to another.
FlatpakTransactionThread holds a reference to all associated
FlatpakJobTransaction and on-demand connnects/disconnects signals as
necessary when the flatpak-side refs change. i.e. to the UI code it
seems as though each FlatpakJobTransaction stands on its own because we
direct signal emission accordingly.
Talking about signals: to simplify locking concerns all interaction
between the Thread and its current Transaction is done through signals.
This goes so far that the current Transaction is only held as a void*
such that one doesn't accidentally call it directly.

M  +111  -53   libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.cpp
M  +6    -9    libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.h
M  +195  -92   libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp
M  +52   -18   libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h

https://invent.kde.org/plasma/discover/-/commit/90f329899d67924c5c3c392a528c87251cd1b7c9

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to