Skip to content

Commit

Permalink
Added: Additional Note w.r.t. needing a non-blocking Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Sep 19, 2024
1 parent 0e21402 commit 0c088a4
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public static void Do(Span<ConfigurablePath> archiveLocations, IFileStore store,
// NOTE: In theory UpdateNxFileStore can call GC back again. This is unlikely to happen
// however for the time being; because we only run GC when deleting a library item
// or loadout. No callback should do that. Long term we want to prevent re-entrancy.
//
// Running arbitrary code in GC in any system is however prone to possible failure,
// so long term we will want to avoid UpdateNxFileStore (MnemonicDB Commit) to avoid
// yielding to external code. We need a non-blocking `Commit`; that
// sends stuff off to another thread or internal queue without blocking.
var updater = new NxFileStoreUpdater(connection);
foreach (var entry in toUpdateInDataStore)
{
Expand Down

0 comments on commit 0c088a4

Please sign in to comment.