Show / Hide Table of Contents

Class CoalescingChunkProvider

Chunk provider that coalesces multiple requests for the same chunk into a single request. This prevents redundant generation of the same chunk when multiple requests are made concurrently.

Inheritance
object
CoalescingChunkProvider
Implements
IChunkProvider
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TerraProc.Core.Provider
Assembly: TerraProc.Core.dll
Syntax
public sealed class CoalescingChunkProvider : IChunkProvider

Constructors

| Edit this page View Source

CoalescingChunkProvider(IChunkProvider)

Chunk provider that coalesces multiple requests for the same chunk into a single request. This prevents redundant generation of the same chunk when multiple requests are made concurrently.

Declaration
public CoalescingChunkProvider(IChunkProvider provider)
Parameters
Type Name Description
IChunkProvider provider

Underlying chunk provider to use for generating chunks.

Methods

| Edit this page View Source

GetAsync(ChunkCoords, CancellationToken)

Gets the chunk at the specified coordinates, coalescing multiple requests for the same chunk.

Declaration
public Task<ChunkData> GetAsync(ChunkCoords coords, CancellationToken ct = default)
Parameters
Type Name Description
ChunkCoords coords

Coordinates of the chunk to retrieve.

CancellationToken ct

Cancellation token to cancel the request.

Returns
Type Description
Task<ChunkData>

Chunk data.

Implements

IChunkProvider
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX