Skip to content

Instantly share code, notes, and snippets.

@Thorium
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Thorium/c64b8c5bd105f4f53d1e to your computer and use it in GitHub Desktop.
Save Thorium/c64b8c5bd105f4f53d1e to your computer and use it in GitHub Desktop.
Getting started with Akka.NET
// Create Console-application, then NuGet: Install-Package Akka
module AkkaConsoleApplication
open Akka
open Akka.Actor
type Greet(who) =
member x.Who = who
type GreetingActor() as g =
inherit ReceiveActor()
do g.Receive<Greet>(fun (greet:Greet) -> printfn "Hello %s" greet.Who)
[<EntryPoint>] // Works also from F#-Interactive.
let main argv = // More details: http://getakka.net/docs/Getting%20started
let system = ActorSystem.Create "MySystem"
let greeter = system.ActorOf<GreetingActor> "greeter"
"World" |> Greet |> greeter.Tell
System.Console.ReadLine() |> ignore
0 // return an integer exit code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment