VS
open System
[<EntryPoint>]
let main argv =
let requestsMb = MailboxProcessor<int>.Start(fun inbox ->
let rec loop () =
async {
match! inbox.Receive() with
| 0 ->
printfn "0"
| _ ->
printfn "1"
do! Async.Sleep 1000
return! loop()
}
loop()
)
requestsMb.Post(1)
requestsMb.Post(0)
requestsMb.Post(1)
Console.ReadKey() |> ignore

