Skip to content

Commit

Permalink
Update documents
Browse files Browse the repository at this point in the history
  • Loading branch information
mewlist committed Nov 14, 2023
1 parent 8110750 commit 686b733
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 7 deletions.
7 changes: 7 additions & 0 deletions docs/en/TaskInterval/exception.html.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/en/TaskQueue/awaitable.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ <h2 id="waiting-for-the-completion-of-a-specific-task">Waiting for the Completio
taskQueue.Enqueue(async ct =&gt;
await Task.Delay(TimeSpan.FromSeconds(0.1f), ct));

var awaiter = taskQueue.EnqueueAsync(async ct =&gt;
var awaitable = taskQueue.EnqueueAsync(async ct =&gt;
await Task.Delay(TimeSpan.FromSeconds(0.1f), ct));

taskQueue.Enqueue(async ct =&gt;
await Task.Delay(TimeSpan.FromSeconds(1f), ct));

// Although there are still tasks in the queue,
// the processing will resume as soon as the third task is completed
await awaiter;
await awaitable;

</code></pre>

Expand Down
7 changes: 7 additions & 0 deletions docs/en/TaskQueue/awaitable.html.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions docs/en/TaskQueue/exception.html.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ <h1 id="mewcore">MewCore</h1>
<p>Core Game Libraries for Unity</p>
<p><img src="https://img.shields.io/badge/unity-2022.3%20or%20later-green?logo=unity" alt="">
<a href="https://github.com/mewlist/MewCore/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt=""></a></p>
<h2 id="document">Document</h2>
<ul>
<li><a href="ja/">日本語</a></li>
<li><a href="en/">English</a></li>
</ul>

</article>

Expand Down
6 changes: 3 additions & 3 deletions docs/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"en/TaskQueue/awaitable.html": {
"href": "en/TaskQueue/awaitable.html",
"title": "Waiting for the Completion of a Specific Task | MewCore",
"keywords": "Waiting for the Completion of a Specific Task In TaskQueue, the EnqueueAsync method is provided to wait for the completion of tasks added as an alternative to the Enqueue method. This feature allows the calling process to be temporarily suspended while the task is being completed and then resume processing after the task is completed. await taskQueue.EnqueueAsync(async ct => await Task.Delay(TimeSpan.FromSeconds(0.1f), ct)); You can queue multiple processes and wait for the completion of a specific task. This is particularly useful when the code to queue tasks is dispersed across multiple locations. It allows you to wait only for the tasks of interest while maintaining safe execution processes via the queue. taskQueue.Enqueue(async ct => await Task.Delay(TimeSpan.FromSeconds(0.1f), ct)); taskQueue.Enqueue(async ct => await Task.Delay(TimeSpan.FromSeconds(0.1f), ct)); var awaiter = taskQueue.EnqueueAsync(async ct => await Task.Delay(TimeSpan.FromSeconds(0.1f), ct)); taskQueue.Enqueue(async ct => await Task.Delay(TimeSpan.FromSeconds(1f), ct)); // Although there are still tasks in the queue, // the processing will resume as soon as the third task is completed await awaiter;"
"keywords": "Waiting for the Completion of a Specific Task In TaskQueue, the EnqueueAsync method is provided to wait for the completion of tasks added as an alternative to the Enqueue method. This feature allows the calling process to be temporarily suspended while the task is being completed and then resume processing after the task is completed. await taskQueue.EnqueueAsync(async ct => await Task.Delay(TimeSpan.FromSeconds(0.1f), ct)); You can queue multiple processes and wait for the completion of a specific task. This is particularly useful when the code to queue tasks is dispersed across multiple locations. It allows you to wait only for the tasks of interest while maintaining safe execution processes via the queue. taskQueue.Enqueue(async ct => await Task.Delay(TimeSpan.FromSeconds(0.1f), ct)); taskQueue.Enqueue(async ct => await Task.Delay(TimeSpan.FromSeconds(0.1f), ct)); var awaitable = taskQueue.EnqueueAsync(async ct => await Task.Delay(TimeSpan.FromSeconds(0.1f), ct)); taskQueue.Enqueue(async ct => await Task.Delay(TimeSpan.FromSeconds(1f), ct)); // Although there are still tasks in the queue, // the processing will resume as soon as the third task is completed await awaitable;"
},
"en/TaskQueue/exception.html": {
"href": "en/TaskQueue/exception.html",
Expand All @@ -142,7 +142,7 @@
"index.html": {
"href": "index.html",
"title": "MewCore | MewCore",
"keywords": "MewCore Core Game Libraries for Unity"
"keywords": "MewCore Core Game Libraries for Unity Document 日本語 English"
},
"ja/TaskInterval/exception.html": {
"href": "ja/TaskInterval/exception.html",
Expand All @@ -157,7 +157,7 @@
"ja/TaskQueue/awaitable.html": {
"href": "ja/TaskQueue/awaitable.html",
"title": "特定のタスクの完了を待機する | MewCore",
"keywords": "特定のタスクの完了を待機する TaskQueue では、Enqueue のかわりに EnqueueAsyncメソッドを使用して追加されたタスクの完了を待機する機能が提供されています。 この機能により、タスクが完了するまでの間、呼び出し側の処理を一時的に中断し、タスクの完了後に処理を再開することができます。 await taskQueue.EnqueueAsync(async ct => await Task.Delay(TimeSpan.FromSeconds(0.1f), ct)); 複数の処理をキューに積んでおき、特定のタスクが完了するまで待機することができます。 特に、キューに対してタスクを積むコードが複数箇所に分散している場合、 キューによる安全な実行処理を維持しつつ、関心のあるタスクだけを待つことが可能です。 taskQueue.Enqueue(async ct => await Task.Delay(TimeSpan.FromSeconds(0.1f), ct)); taskQueue.Enqueue(async ct => await Task.Delay(TimeSpan.FromSeconds(0.1f), ct)); var awaiter = taskQueue.EnqueueAsync(async ct => await Task.Delay(TimeSpan.FromSeconds(0.1f), ct)); taskQueue.Enqueue(async ct => await Task.Delay(TimeSpan.FromSeconds(1f), ct)); // キューにはタスクがまだ残っているが3番めのタスクが完了し次第、処理が再開される await awaiter;"
"keywords": "特定のタスクの完了を待機する TaskQueue では、Enqueue のかわりに EnqueueAsyncメソッドを使用して追加されたタスクの完了を待機する機能が提供されています。 この機能により、タスクが完了するまでの間、呼び出し側の処理を一時的に中断し、タスクの完了後に処理を再開することができます。 await taskQueue.EnqueueAsync(async ct => await Task.Delay(TimeSpan.FromSeconds(0.1f), ct)); 複数の処理をキューに積んでおき、特定のタスクが完了するまで待機することができます。 特に、キューに対してタスクを積むコードが複数箇所に分散している場合、 キューによる安全な実行処理を維持しつつ、関心のあるタスクだけを待つことが可能です。 taskQueue.Enqueue(async ct => await Task.Delay(TimeSpan.FromSeconds(0.1f), ct)); taskQueue.Enqueue(async ct => await Task.Delay(TimeSpan.FromSeconds(0.1f), ct)); // このタスクの完了を待ちたい var awaitable = taskQueue.EnqueueAsync(async ct => await Task.Delay(TimeSpan.FromSeconds(0.1f), ct)); taskQueue.Enqueue(async ct => await Task.Delay(TimeSpan.FromSeconds(1f), ct)); // キューにはタスクがまだ残っているが3番めのタスクが完了し次第、処理が再開される await awaitable;"
},
"ja/TaskQueue/exception.html": {
"href": "ja/TaskQueue/exception.html",
Expand Down
5 changes: 3 additions & 2 deletions docs/ja/TaskQueue/awaitable.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,15 @@ <h2 id="特定のタスクの完了を待機する">特定のタスクの完了
taskQueue.Enqueue(async ct =&gt;
await Task.Delay(TimeSpan.FromSeconds(0.1f), ct));

var awaiter = taskQueue.EnqueueAsync(async ct =&gt;
// このタスクの完了を待ちたい
var awaitable = taskQueue.EnqueueAsync(async ct =&gt;
await Task.Delay(TimeSpan.FromSeconds(0.1f), ct));

taskQueue.Enqueue(async ct =&gt;
await Task.Delay(TimeSpan.FromSeconds(1f), ct));

// キューにはタスクがまだ残っているが3番めのタスクが完了し次第、処理が再開される
await awaiter;
await awaitable;

</code></pre>

Expand Down
3 changes: 3 additions & 0 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@
"version": ""
},
{
"log_codes": [
"InvalidFileLink"
],
"type": "Conceptual",
"source_relative_path": "index.md",
"output": {
Expand Down

0 comments on commit 686b733

Please sign in to comment.