My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Links

NAct is an Actors framework for the .NET platform.

What are actors?

  • Objects that run in their own thread
  • They communicate by passing messages
  • Requests for data between actors are done asynchronously

Why would I want to use Actors?

  • It's a really easy way of making a program run in parallel (so it's faster and more responsive)
  • There's no risk of thread-unsafety or deadlocks or race conditions

Do actors already exist?

  • Scala is a language with support for actors and good support for immutable objects. Runs well on the JVM. The syntax for message passing is a little clunky
  • Axum is an experimental c# extension (so runs on .NET). It's not finished, and it's syntax is also clunky

What's different about NAct?

  • Message passing is simply calling a method on another actor: make sure the method either returns void or Task, and NAct's reflection-based proxy system takes care of the threading for you
  • C#5 async/await is supported: if you call an asyncronous method that returns Task, then await on the result, and NAct will make sure your code is resumed in the correct thread
  • .NET events are supported, so if one actor signs up to an event on another actor, the event handler is called in the right thread
  • Supports Windows Forms and WPF easily - if your actor is also a Windows Forms or WPF control, NAct will automatically call it in the foreground thread
  • It's a library for .NET, not a language extension, so you can use it from any .NET language by referencing NAct.dll

See NAct in action

Learn how to use NAct

Powered by Google Project Hosting