Doc: Corrected a few spelling mistakes (#1840)

This commit is contained in:
Conny Hansson 2021-10-08 19:34:47 +02:00 committed by GitHub
parent 87cc4df14b
commit 119abf3ee4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -11,7 +11,7 @@ tags:
## Intent
The active object design pattern decouples method execution from method invocation for objects that each reside in their thread of control. The goal is to introduce concurrency, by using asynchronous method invocation and a scheduler for handling requests.
The active object design pattern decouples method execution from method invocation for objects that each reside in their thread of control. The goal is to introduce concurrency, by using asynchronous method invocation, and a scheduler for handling requests.
## Explanation
@ -70,7 +70,7 @@ public abstract class ActiveCreature{
requests.put(new Runnable() {
@Override
public void run() {
logger.info("{} has started to roam and the wastelands.",name());
logger.info("{} has started to roam the wastelands.",name());
}
}
);
@ -82,7 +82,7 @@ public abstract class ActiveCreature{
}
```
We can see that any class that will extend the ActiveCreature class will have its own thread of control to execute and invocate methods.
We can see that any class that will extend the ActiveCreature class will have its own thread of control to invoke and execute methods.
For example, the Orc class:
@ -96,7 +96,7 @@ public class Orc extends ActiveCreature {
}
```
Now, we can create multiple creatures such as Orcs, tell them to eat and roam and they will execute it on their own thread of control:
Now, we can create multiple creatures such as Orcs, tell them to eat and roam, and they will execute it on their own thread of control:
```java
public static void main(String[] args) {

View File

@ -82,7 +82,7 @@ public abstract class ActiveCreature {
}
/**
* Roam in the wastelands.
* Roam the wastelands.
* @throws InterruptedException due to firing a new Runnable.
*/
public void roam() throws InterruptedException {