Esempio n. 1
0
        private async ValueTask <(Status, Output)> CompletePendingReadAsync(long serialNo, bool waitForCommit = false, CancellationToken token = default)
        {
            token.ThrowIfCancellationRequested();

            if (fht.epoch.ThisInstanceProtected())
            {
                throw new NotSupportedException("Async operations not supported over protected epoch");
            }

            if (waitForCommit)
            {
                (Status, Output)s = await fht.CompletePendingReadAsync(serialNo, this, token);
                await WaitForCommitAsync(token);

                return(s);
            }
            else
            {
                return(await fht.CompletePendingReadAsync(serialNo, this, token));
            }
        }