Skip to content

Commit

Permalink
Merge pull request #23 from Horusiath/release-2.1
Browse files Browse the repository at this point in the history
Pre-release 2.1
  • Loading branch information
Horusiath committed Dec 17, 2015
2 parents 36519fd + e13be9e commit 2edc93e
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -2,6 +2,8 @@

This is the experimental fork of Akka.FSharp library, introducing new features such as typed actor refs, and also simplifying existing Akka.FSharp API. The main reason for splitting from official API is to be able to introduce new (also experimental), but possibly breaking changes outside existing Akka release cycle.

**Read wiki pages for more info.**

## Hello world

```fsharp
Expand Down
8 changes: 8 additions & 0 deletions RELEASE_NOTES.md
@@ -1,3 +1,11 @@
### New in 0.2.1 (Released 2015/12/17)
* Forward operator `<<!`
* Parent property in actor contexts
* Split Persist/PersistAsyn effect into single- and multi-event versions
* Initialized native F# support for Akka.IO (Akkling.IO namespace)
* F# support for some of the Akka system messages in form of active patterns.
* Akkling.Behaviors module with set of common behaviors.

### New in 0.2.0 (Released 2015/11/20)
* New effects-based actor expression API
* New Persistence API based on effects
Expand Down
1 change: 1 addition & 0 deletions src/Akkling/Akkling.fsproj
Expand Up @@ -70,6 +70,7 @@
<Compile Include="Linq.fs" />
<Compile Include="FaultHandling.fs" />
<Compile Include="Spawning.fs" />
<Compile Include="Behaviors.fs" />
<Compile Include="Schedulers.fs" />
<Compile Include="Logging.fs" />
<Compile Include="Utils.fs" />
Expand Down
31 changes: 31 additions & 0 deletions src/Akkling/Behaviors.fs
@@ -0,0 +1,31 @@

//-----------------------------------------------------------------------
// <copyright file="Actors.fs" company="Akka.NET Project">
// Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com>
// Copyright (C) 2013-2015 Akka.NET project <https://github.com/akkadotnet/akka.net>
// Copyright (C) 2015 Bartosz Sypytkowski <gttps://github.com/Horusiath>
// </copyright>
//-----------------------------------------------------------------------

module Akkling.Behaviors

/// <summary>
/// An empty actor behavior, which ignores all incoming messages.
/// </summary>
let ignore (context:Actor<'Message>) : Behavior<'Message> =
let rec loop () = actor {
let! _ = context.Receive()
return! loop ()
}
loop ()

/// <summary>
/// Actor behavior, which resends message back to it's sender.
/// </summary>
let echo (context: Actor<'Message>) : Behavior<'Message> =
let rec loop () = actor {
let! msg = context.Receive()
context.Sender () <! msg
return! loop ()
}
loop ()

0 comments on commit 2edc93e

Please sign in to comment.