feat(runtime): atomically replace collision generations

This commit is contained in:
Erik 2026-08-01 17:33:34 +02:00
parent 99bf1751bb
commit 9b0f59bd1b
21 changed files with 2435 additions and 408 deletions

View file

@ -1362,19 +1362,23 @@ public sealed class StreamingController
{
if (!transaction.PendingPublicationsCleared)
{
bool cancelled = false;
if (!TryRunStreamingWork(
meter,
new StreamingWorkCost(EntityOperations: 1),
"recenter-cancel-publications",
() =>
{
_presentation.CancelPendingPublications();
transaction.PendingPublicationsCleared = true;
cancelled =
_presentation.CancelPendingPublications();
return true;
}))
{
return false;
}
transaction.PendingPublicationsCleared = cancelled;
if (!cancelled)
return false;
}
if (!TryRunStreamingWork(
meter,
@ -1519,19 +1523,23 @@ public sealed class StreamingController
{
if (!transaction.PendingPublicationsCleared)
{
bool cancelled = false;
if (!TryRunStreamingWork(
meter,
new StreamingWorkCost(EntityOperations: 1),
"reload-cancel-publications",
() =>
{
_presentation.CancelPendingPublications();
transaction.PendingPublicationsCleared = true;
cancelled =
_presentation.CancelPendingPublications();
return true;
}))
{
return false;
}
transaction.PendingPublicationsCleared = cancelled;
if (!cancelled)
return false;
}
if (!TryRunStreamingWork(
meter,