Пример #1
0
        internal ValueTask <IMemoryOwner <byte> > GetBlockAsync(AsyncBlockManager block)
        {
            if (block.Task.IsCompletedSuccessfully)
            {
                return(new ValueTask <IMemoryOwner <byte> >(block.GetMemoryManager()));
            }

            return(InternalGetBlockAsync(block));
Пример #2
0
            static async ValueTask <IMemoryOwner <byte> > InternalGetBlockAsync(AsyncBlockManager block)
            {
                await block.Task;

                return(block.GetMemoryManager());
            }