Cricket is an actor library. The actor programming model is inherently concurrent, an actor is a primitive that wraps a computation, the computation is ran by sending messages to the actor. The actor can then respond to the receipt of the message by executing one or more of the following actions (possibly concurrently),
Currently there are a couple of actor libraries on the .NET platform
MailboxProcessor<'T>
type. Cricket in no way aims to be a clone of either of these however it does draw on the ideas in all of the above frameworks as well as Erlang and OTP. Cricket aims to be as simple and safe to use as possible hopefully making it very difficult for you to shoot or self in the foot.
Simply build Cricket.sln in Visual Studio, Mono Develop, or Xamarin Studio. You can also use the FAKE script:
#r "Cricket.dll"
open Cricket
ActorHost.Start()
type Say =
| Hello
| HelloWorld
| Name of string
let greeter =
actor {
name "greeter"
body (
let rec loop() = messageHandler {
let! msg = Message.receive()
match msg with
| Hello -> printfn "Hello"
| HelloWorld -> printfn "Hello World"
| Name name -> printfn "Hello, %s" name
return! loop()
}
loop())
} |> Actor.spawn
greeter <-- Name("from F# Actor")
The default maintainer account for projects under "fsprojects" is @fsprojectsgit - F# Community Project Incubation Space (repo management)