From e969a3bc1c7f9181effea45f7ea291bed7ca343b Mon Sep 17 00:00:00 2001 From: Wessel Kranenborg Date: Tue, 8 Jun 2021 07:09:12 +0200 Subject: [PATCH] Fix documentation flaw for "Forward" Closes https://github.com/akkadotnet/akka.net/issues/4973 --- docs/articles/actors/receive-actor-api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/articles/actors/receive-actor-api.md b/docs/articles/actors/receive-actor-api.md index 553d4194f30..273d41da26b 100644 --- a/docs/articles/actors/receive-actor-api.md +++ b/docs/articles/actors/receive-actor-api.md @@ -405,10 +405,10 @@ For more information on Tasks, check out the [MSDN documentation](https://msdn.m > When using task callbacks inside actors, you need to carefully avoid closing over the containing actor’s reference, i.e. do not call methods or access mutable state on the enclosing actor from within the callback. This would break the actor encapsulation and may introduce synchronization bugs and race conditions because the callback will be scheduled concurrently to the enclosing actor. Unfortunately there is not yet a way to detect these illegal accesses at compile time. ### Forward message -You can forward a message from one actor to another. This means that the original sender address/reference is maintained even though the message is going through a 'mediator'. This can be useful when writing actors that work as routers, load-balancers, replicators etc. You need to pass along your context variable as well. +You can forward a message from one actor to another. This means that the original sender address/reference is maintained even though the message is going through a 'mediator'. This can be useful when writing actors that work as routers, load-balancers, replicators etc. ```csharp -target.Forward(result, Context); +target.Forward(result); ``` ## Receive messages