Skip to content

Commit

Permalink
Fix typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
veblush committed Jun 2, 2016
1 parent 6061d6d commit a963663
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/CommunicateWithActor.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ var hello = await greeter.Greet("Actor"); // send Greet and waits for a respons
var count = await greeter.GetCount(); // send GetCount and waits for a response
```

#### RequestWaitor
#### RequestWaiter

`Ref` class needs a `RequestWaitor` which is a request context
`Ref` class needs a `RequestWaiter` which is a request context
for receiving a response.
Default one is `AkkaAskRequestWaiter` which uses `Ask` method for `IActorRef`.

```csharp
var greeter = new GreeterRef(a); // RequestWaitor is AkkaAskRequestWaiter
var greeter = new GreeterRef(a); // RequestWaiter is AkkaAskRequestWaiter
await greeter.Greet("Actor"); // create a temporary actor and
// waits for a response with it
```
Expand All @@ -40,13 +40,13 @@ Because `Ask` always creates a temporary actor for waiting for a response,
it is better for an interfaced actor to have its own request context.

```csharp
var greeter = new GreeterRef(a, this); // RequestWaitor is this
var greeter = new GreeterRef(a, this); // RequestWaiter is this
await greeter.Greet("Actor"); // does not create a temporary actor and
// waits for a response with this
```

So when you get `Ref` and will use in an interfaced actor, it's a good idea to
set `RequestWaitor`as this like following:
set `RequestWaiter`as this like following:

```csharp
var greeter = GetActorFromSomewhere();
Expand Down

0 comments on commit a963663

Please sign in to comment.