Skip to content

Commit

Permalink
Merge pull request #22 from Cysharp/feature/UpdateReadme1120
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
mayuki committed Nov 20, 2023
2 parents 465caa5 + 5a81d1c commit df85d30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.ja.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# LogicLooper
.NET Core でのサーバーアプリケーションでループを使用したプログラミングモデルを実装するためのライブラリです。
.NET でのサーバーアプリケーションでループを使用したプログラミングモデルを実装するためのライブラリです。
主にサーバーサイドにロジックがあるゲームサーバーのようなユースケースにフォーカスしています。

例えば次のようなゲームループがある場合、これらを集約して素朴な `Task` による駆動よりも効率の良い形で動かす方法を提供します。
Expand Down Expand Up @@ -196,7 +196,7 @@ await looper.RegisterActionAsync((in LogicLooperActionContext ctx) =>
{
// Something to do (低頻度) ...
return true;
}, LoopActionOptions.Default with { TargetFrameRateOverride = 10 }); // 10 fps で呼び出される
}, LooperActionOptions.Default with { TargetFrameRateOverride = 10 }); // 10 fps で呼び出される
```

注意点として大元のループ自体の実行頻度によってアクションの実行粒度が変わります。これは Looper のターゲットフレームレートよりも正確性が劣ることがあるということを意味します。
Expand All @@ -218,4 +218,4 @@ await looper.RegisterActionAsync(static async (ctx, state) =>
```

> [!WARNING]
> もしアクションが同期的に完了する場合 (つまり非同期メソッドであっても `ValueTask.IsCompleted = true` となる状況)、async ではないバージョンとパフォーマンスの差はありません。しかし await して非同期処理に対して継続実行する必要がある場合にはとても低速になります。この非同期サポートは低頻度の外部との通信を目的とした緊急ハッチ的な役割を提供します。高頻度での非同期処理を実行することは強く非推奨です。
> もしアクションが同期的に完了する場合 (つまり非同期メソッドであっても `ValueTask.IsCompleted = true` となる状況)、async ではないバージョンとパフォーマンスの差はありません。しかし await して非同期処理に対して継続実行する必要がある場合にはとても低速になります。この非同期サポートは低頻度の外部との通信を目的とした緊急ハッチ的な役割を提供します。高頻度での非同期処理を実行することは強く非推奨です。
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[日本語](README.ja.md)

A library is for building server application using loop-action programming model on .NET Core. This library focuses on building game servers with server-side logic.
A library is for building server application using loop-action programming model on .NET. This library focuses on building game servers with server-side logic.

For example, if you have the following game loops, the library will provide a way to aggregate and process in a more efficient way than driving with a simple `Task`.

Expand Down Expand Up @@ -199,7 +199,7 @@ await looper.RegisterActionAsync((in LogicLooperActionContext ctx) =>
{
// Something to do (low priority) ...
return true;
}, LoopActionOptions.Default with { TargetFrameRateOverride = 10 }); // The action will be called at 10fps.
}, LooperActionOptions.Default with { TargetFrameRateOverride = 10 }); // The action will be called at 10fps.
```

The granularity of action execution changes based on the execution frequency of the main loop itself. This means that the accuracy may be inferior to the target frame rate of the Looper.
Expand All @@ -222,4 +222,4 @@ await looper.RegisterActionAsync(static async (ctx, state) =>
```

> [!WARNING]
> If an action completes immediately (`ValueTask.IsCompleted = true`), there's no performance difference from non-async version. But it is very slow if there's a need to await. This asynchronous support provides as an emergency hatch when it becomes necessary to communicate with the outside at a low frequency. We do not recommended to perform asynchronous processing at a high frequency.
> If an action completes immediately (`ValueTask.IsCompleted = true`), there's no performance difference from non-async version. But it is very slow if there's a need to await. This asynchronous support provides as an emergency hatch when it becomes necessary to communicate with the outside at a low frequency. We do not recommended to perform asynchronous processing at a high frequency.

0 comments on commit df85d30

Please sign in to comment.