From 77dbab9abeb4cdc8526b99bd57e41f20c2f9c1e8 Mon Sep 17 00:00:00 2001 From: Lars M Date: Wed, 11 Sep 2024 15:54:29 +0000 Subject: [PATCH] GITBOOK-33: No subject --- documentation/optimizations/multithreading.md | 4 ++-- extensions/page-3/arch.system.sourcegenerator.md | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/documentation/optimizations/multithreading.md b/documentation/optimizations/multithreading.md index fa9dcd8..07b139c 100644 --- a/documentation/optimizations/multithreading.md +++ b/documentation/optimizations/multithreading.md @@ -59,7 +59,7 @@ Of course, every form of [`Query`](../query.md) is supported again. Even [**inli } } -world.ParallelInlineQuery<VelocityUpdate, Position, Velocity>(in queryDescription); +world.InlineParallelQuery<VelocityUpdate, Position, Velocity>(in queryDescription); {% hint style="warning" %} @@ -86,7 +86,7 @@ If this is all too high level for you, there is also the option of tackling the } } -world.ParallelQuery(in query, new VelocityUpdate()); +world.InlineParallelChunkQuery(in query, new VelocityUpdate()); {% hint style="info" %} diff --git a/extensions/page-3/arch.system.sourcegenerator.md b/extensions/page-3/arch.system.sourcegenerator.md index 7a31cae..4c825b4 100644 --- a/extensions/page-3/arch.system.sourcegenerator.md +++ b/extensions/page-3/arch.system.sourcegenerator.md @@ -6,3 +6,14 @@ description: >- # Arch.System.SourceGenerator +I know, I know... writing queries is always sooo much work. If only you could have it all generated... wait... you can! + +The `Arch.System.SourceGenerator` package provides some code generation utils. With them, queries can be written virtually by themselves which saves some boilerplate code. + +**Query** methods can be generated **in** [**all classes**](#user-content-fn-1)[^1] **as long as they are partial**. However it makes most sense in the [`BaseSystem`](arch.system.md). The attributes can be used to meaningfully describe what query to generate, and the query will always call the annotated method. + +## Start the engine + + + +[^1]: Also static ones, without a `BaseSystem` inheritance.