Browse Source

Restore investment-worker and socket-list plumbing the subclass commits depend on

These declarations originally shipped in the PR #18 / Linux-support merge, which was
not reapplied here since it is already upstream. Cherry-picking the subclass commits
on their own left request_slice() and the socket_lists alias missing.
Millie 3 weeks ago
parent
commit
e0640a83d9

+ 8 - 0
Sunrise/src/client/content/investment/worker.h

@@ -16,4 +16,12 @@ void service(std::uint64_t nowMilliseconds) noexcept;
 /** Stops taking refresh slices and clears the pending overlay. */
 void reset() noexcept;
 
+/**
+ * Makes the next `service` pump take another refresh slice even though a prior one completed.
+ * A committed mutation that invalidates one already-published build-data domain needs this: the
+ * completion latch that keeps a steady session from re-running `refresh` every pump would
+ * otherwise never notice the domain came back stale.
+ */
+void request_slice() noexcept;
+
 } // namespace sunrise::client::content::investment::worker

+ 10 - 0
Sunrise/src/client/content/investment/worker/investment_refresh_worker.cpp

@@ -76,4 +76,14 @@ void reset() noexcept {
     ReleaseSRWLockExclusive(&g_lifecycleLock);
 }
 
+/** Makes the next due pump take another refresh slice even though a prior one completed. */
+void request_slice() noexcept {
+    AcquireSRWLockExclusive(&g_lifecycleLock);
+    if (g_accepting) {
+        g_complete = false;
+        g_nextEligible = 0;
+    }
+    ReleaseSRWLockExclusive(&g_lifecycleLock);
+}
+
 } // namespace sunrise::client::content::investment::worker

+ 1 - 0
Sunrise/src/server/bap/encrypted/transactions/service_outcome_commit.cpp

@@ -1,5 +1,6 @@
 #include "service_outcome_commit.h"
 
+#include "../../../../client/content/investment/worker.h"
 #include "../../../../core/logging/log.h"
 #include "../../../../state/activity/bubble_authority/runtime.h"
 #include "../../../../state/activity/runtime.h"

+ 1 - 0
Sunrise/src/state/runtime/state_account_runtime.cpp

@@ -25,6 +25,7 @@ namespace authored_inventory = account::inventory;
 namespace item_details = build_data::items::details;
 namespace inventory_buckets = build_data::inventory::buckets;
 namespace family4_loadout = middleware::datagen::family4::loadout;
+namespace socket_lists = build_data::socket_entry_lists;
 
 /** First SOID reserved for item instances created by this local runtime. */
 constexpr std::uint64_t kFirstGeneratedItemSoid = 0x4000000000000001ULL;