Skip to content

Commit ec0ff06

Browse files
committed
Updated Procedures in Readme.
1 parent 0fa8730 commit ec0ff06

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Readme.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,18 @@ Producer-Consumer pattern. One or more threads become consumers and execute tas
160160
## Procedures ##
161161
These are mechanisms for sequential processing. Call all tasks in the order in which they were registered. Wait for the calls to complete one by one before proceeding. Different fibers can be specified for each action. Can be performed repeatedly.
162162

163-
* _[FiberAndTaskPairList](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorks/Procedures/FiberAndTaskPairList.cs)_ - List of destination fiber and task pairs. [Example](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorksTests/FiberAndTaskPairListTests.cs).
164-
* _[FiberAndHandlerPairList{TMessage}](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorks/Procedures/FiberAndHandlerPairList.cs)_ - List of destination fiber and handler pairs. Can be used for event handling. [Example](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorksTests/FiberAndTaskPairListTests.cs#L93).
163+
* _[FiberAndTaskPairList](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorks/Procedures/FiberAndTaskPairList.cs)_ - List of fiber and task pairs. Tasks using different fibers can be processed sequentially. Can be used repeatedly. [Example](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorksTests/FiberAndTaskPairListTests.cs).
164+
* _[FiberAndHandlerPairList{TMessage}](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorks/Procedures/FiberAndHandlerPairList.cs)_ - List of fiber and handler pairs. Can be used for event handling. Can be used repeatedly. [Example](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorksTests/FiberAndTaskPairListTests.cs#L93).
165+
* _[ISequentialTaskWaiter](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorks/Procedures/ISequentialTaskWaiter.cs)_ - This allows you to await the execution timing of FiberAndTaskPairList. It can be created by `FiberAndTaskPairList.CreateWaiter()`. [Example](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorksTests/SequentialTaskWaiterTests.cs#L11).
166+
* _[ISequentialHandlerWaiter{T}](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorks/Procedures/ISequentialHandlerWaiter.cs)_ - This allows you to wait for the execution timing of FiberAndHandlerPairList. It can be created by `FiberAndHandlerPairList<TMessage>.CreateWaiter()`. [Example](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorksTests/SequentialTaskWaiterTests.cs#L186).
167+
168+
### Game Loop ###
169+
170+
Repeated calls to `FiberAndTaskPairList.PublishSequentialAsync` allow you to implement a tick-based game loop, but you must provide your own high-precision sleep function or timer.
171+
172+
By calling multiple `FiberAndTaskPairList.PublishSequentialAsync` in sequence within a single tick, you can specify timing within one tick.
173+
174+
Similarly, by calling `ConcurrentQueueActionQueue.ExecuteNextBatch` within one tick, you can perform one-time processing at a specified timing.
165175

166176
## Channels ##
167177
This is a mechanism for parallel processing. A channel is a messaging mechanism that abstracts the communication destination. Fibers act as actors. Arrival messages are processed in parallel for each fiber.

0 commit comments

Comments
 (0)