https://github.com/kthompson/actress
Actress is a C# port of the F# MailboxProcessor
https://github.com/kthompson/actress
actor-model c-sharp dotnet
Last synced: about 2 months ago
JSON representation
Actress is a C# port of the F# MailboxProcessor
- Host: GitHub
- URL: https://github.com/kthompson/actress
- Owner: kthompson
- License: apache-2.0
- Created: 2015-06-24T21:17:11.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-07-09T10:09:20.000Z (over 5 years ago)
- Last Synced: 2025-08-16T16:47:16.522Z (about 2 months ago)
- Topics: actor-model, c-sharp, dotnet
- Language: C#
- Homepage:
- Size: 32.2 KB
- Stars: 38
- Watchers: 6
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Actress
[](https://www.nuget.org/packages/Actress/) [](https://ci.appveyor.com/api/projects/status/github/kthompson/Actress?svg=true)
Actress is a C# port of the F# MailboxProcessor.
nuget install Actress # Install C# Actor system
# Example
```csharp
var printerAgent = MailboxProcessor.Start(async mb =>
{
while (true)
{
var value = await mb.Receive();
Trace.WriteLine("Message was: " + value);
}
});
using (printerAgent)
{
printerAgent.Post("hello");
printerAgent.Post("hello again");
printerAgent.Post("hello a third time");
}
```