feat: add streaming primitives (IChunkRenderer, IJobExecutor, NeighborSnapshots, ChunkJob)

This commit is contained in:
2026-06-01 10:48:56 +02:00
parent 39375b83ea
commit dc74fdadcc
5 changed files with 95 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
namespace VoxelEngine.World.Streaming;
public interface IJobExecutor
{
void Submit(Action work);
}
public sealed class ThreadPoolJobExecutor : IJobExecutor
{
// Fire-and-forget: the Task is intentionally discarded. The caller's `work`
// delegate MUST catch its own exceptions and report them via a dedicated
// channel (e.g. ChunkJobResult.Error in the streaming pipeline). Unhandled
// exceptions here are silently lost.
public void Submit(Action work) => _ = Task.Run(work);
}