You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+16-10Lines changed: 16 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,6 +149,15 @@ Fiber is a mechanism for sequential processing. Actions added to a fiber are ex
149
149
150
150
* _[PoolFiber](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorks/Fibers/PoolFiber.cs)_ - Fiber. ".NET ThreadPool" is used by default. User thread pools are also available.
151
151
152
+
### Parallel processing ###
153
+
Related operations can be submitted to a single fiber to run sequentially, while unrelated operations can be submitted to different fibers to run in parallel. When dealing with multiple fibers, they can be thought of as actors. This design concept has not changed significantly from the source Retlang. The following description is taken from Retlang.
154
+
155
+
> Message based concurrency in .NET
156
+
> \[...\]
157
+
> The library is intended for use in [message based concurrency](http://en.wikipedia.org/wiki/Message_passing) similar to [event based actors in Scala](http://lampwww.epfl.ch/~phaller/doc/haller07actorsunify.pdf). The library does not provide remote messaging capabilities. It is designed specifically for high performance in-memory messaging.
158
+
159
+
(Quote from [Retlang page](https://code.google.com/archive/p/retlang/). Broken links were replaced.)
160
+
152
161
## ThreadPools ##
153
162
Producer-Consumer pattern. One or more threads become consumers and execute tasks taken from the task queue.
154
163
@@ -173,19 +182,16 @@ By calling multiple `FiberAndTaskPairList.PublishSequentialAsync` in sequence wi
* _[Channel](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorks/Channels/Channel.cs)_ - Forward published messages to all subscribers. One-way. [Example](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorksTests/ChannelTests.cs).
AdesignthatspecifiesadestinationFiberandsendsmessagesdirectlyresultsintightcoupling. Thisisnotaproblemifthedesignissmallorspeedisthetoppriority. However, asthedesignscaleincreases, thedisadvantagesoftenoutweighthebenefits. Insuchcases, thismechanismcanbeused.
183
189
184
-
> Messagebasedconcurrencyin .NET
185
-
> \[...\]
186
-
> Thelibraryisintendedforusein [messagebasedconcurrency](http://en.wikipedia.org/wiki/Message_passing) similar to [event based actors in Scala](http://lampwww.epfl.ch/~phaller/doc/haller07actorsunify.pdf). The library does not provide remote messaging capabilities. It is designed specifically for high performance in-memory messaging.
(Quotefrom [Retlangpage](https://code.google.com/archive/p/retlang/). Broken links were replaced.)
192
+
* _[IPublisher{T}](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorks/PubSub/IPublisher.cs)_ - This is a message sending interface. It can be delivered to subscribers via the same type ISubscriber.
193
+
* _[ISubscriber{T}](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorks/PubSub/ISubscriber.cs)_ - This is a message subscription interface. When subscribing, you can receive messages from the same type of IPublisher.
194
+
* _[Channel](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorks/Channels/Channel.cs)_ - This is the implementation class for IPublisher and ISubscriber. Forward published messages to all subscribers. [Example](https://github.com/tosh-coding/AsyncFiberWorks/blob/main/src/AsyncFiberWorksTests/ChannelTests.cs).
0 commit comments