feat(runtime): atomically replace collision generations
This commit is contained in:
parent
99bf1751bb
commit
9b0f59bd1b
21 changed files with 2435 additions and 408 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue