Skip to content

Commit

Permalink
docs: fix wording, multiply -> multiple 🔠
Browse files Browse the repository at this point in the history
  • Loading branch information
oldratlee committed Oct 15, 2024
1 parent 360b65e commit c15bf48
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,16 +420,16 @@ public class ConcurrencyStrategyDemo {
示例代码如下:

```java
public class MultiplyActionsDemo {
public class MultipleActionsDemo {
static void mRunAsyncDemo() {
// MUST wrap tasks to CompletableFuture first, AWKWARD! 😖
// wrap tasks to CompletableFuture first, AWKWARD! 😖
CompletableFuture.allOf(
CompletableFuture.runAsync(() -> System.out.println("task1")),
CompletableFuture.runAsync(() -> System.out.println("task2")),
CompletableFuture.runAsync(() -> System.out.println("task3"))
);

// just run multiply actions, fresh and cool 😋
// just run multiple actions, fresh and cool 😋
CompletableFutureUtils.mRunAsync(
() -> System.out.println("task1"),
() -> System.out.println("task2"),
Expand All @@ -444,9 +444,9 @@ public class MultiplyActionsDemo {
示例代码如下:

```java
public class MultiplyActionsDemo {
public class MultipleActionsDemo {
static void thenMApplyAsyncDemo() {
// MUST wrap tasks to CompletableFuture first, AWKWARD! 😖
// wrap tasks to CompletableFuture first, AWKWARD! 😖
completedFuture(42).thenCompose(v ->
CompletableFutureUtils.allResultsFailFastOf(
CompletableFuture.supplyAsync(() -> v + 1),
Expand All @@ -456,7 +456,7 @@ public class MultiplyActionsDemo {
).thenAccept(System.out::println);
// output: [43, 44, 45]

// just run multiply actions, fresh and cool 😋
// just run multiple actions, fresh and cool 😋
CompletableFutureUtils.thenMApplyFailFastAsync(
completedFuture(42),
v -> v + 1,
Expand All @@ -468,7 +468,7 @@ public class MultiplyActionsDemo {
}
```

> \# 完整可运行的Demo代码参见[`MultiplyActionsDemo.java`](cffu-core/src/test/java/io/foldright/demo/MultiplyActionsDemo.java)
> \# 完整可运行的Demo代码参见[`MultipleActionsDemo.java`](cffu-core/src/test/java/io/foldright/demo/MultipleActionsDemo.java)
### 2.5 支持超时的`join`的方法

Expand Down
2 changes: 1 addition & 1 deletion cffu-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
<version>1.7.0</version>
<extensions>true</extensions>
<!--
In multiply module builds using the deploy-at-end feature, the deployment of all components
In multiple module builds using the deploy-at-end feature, the deployment of all components
is performed in the last module based on the reactor order. If this property is set to true
in the last module, all staging deployment for all modules will be skipped.
so, we'll config nexus deploy after every module's `deploy` phase
Expand Down
2 changes: 1 addition & 1 deletion cffu-core/src/main/java/io/foldright/cffu/CffuFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* About factory methods conventions of {@link CffuFactory}:
* <ul>
* <li>factory methods return {@link Cffu} instead of {@link CompletableFuture}.
* <li>only provide varargs methods for multiply Cffu/CF input arguments;
* <li>only provide varargs methods for multiple Cffu/CF input arguments;
* if you have {@code List} input, use static util methods {@link #cffuListToArray(List)}
* or {@link CompletableFutureUtils#completableFutureListToArray(List)} to convert it to array first.
* </ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@


/**
* This shows the usage of Multiply Actions methods(<b>M</b> Methods).
* This shows the usage of Multiple Actions methods(<b>M</b> Methods).
* <p>
* Run by maven: {@code
* mvn -pl cffu-core test-compile exec:exec -Dexec.mainClass=io.foldright.demo.MultiplyActionsDemo
* mvn -pl cffu-core test-compile exec:exec -Dexec.mainClass=io.foldright.demo.MultipleActionsDemo
* }
*/
public class MultiplyActionsDemo {
public class MultipleActionsDemo {
public static void main(String[] args) {
mRunAsyncDemo();
thenMApplyAsyncDemo();
}

static void mRunAsyncDemo() {
// MUST wrap tasks to CompletableFuture first, AWKWARD! 😖
// wrap tasks to CompletableFuture first, AWKWARD! 😖
CompletableFuture.allOf(
CompletableFuture.runAsync(() -> System.out.println("task1")),
CompletableFuture.runAsync(() -> System.out.println("task2")),
CompletableFuture.runAsync(() -> System.out.println("task3"))
);

// just run multiply actions, fresh and cool 😋
// just run multiple actions, fresh and cool 😋
CompletableFutureUtils.mRunAsync(
() -> System.out.println("task1"),
() -> System.out.println("task2"),
Expand All @@ -40,7 +40,7 @@ static void mRunAsyncDemo() {
}

static void thenMApplyAsyncDemo() {
// MUST wrap tasks to CompletableFuture first, AWKWARD! 😖
// wrap tasks to CompletableFuture first, AWKWARD! 😖
completedFuture(42).thenCompose(v ->
CompletableFutureUtils.allResultsFailFastOf(
CompletableFuture.supplyAsync(() -> v + 1),
Expand All @@ -50,7 +50,7 @@ static void thenMApplyAsyncDemo() {
).thenAccept(System.out::println);
// output: [43, 44, 45]

// just run multiply actions, fresh and cool 😋
// just run multiple actions, fresh and cool 😋
CompletableFutureUtils.thenMApplyFailFastAsync(
completedFuture(42),
v -> v + 1,
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@
<version>1.7.0</version>
<extensions>true</extensions>
<!--
In multiply module builds using the deploy-at-end feature, the deployment of all components
In multiple module builds using the deploy-at-end feature, the deployment of all components
is performed in the last module based on the reactor order. If this property is set to true
in the last module, all staging deployment for all modules will be skipped.
so, we'll config nexus deploy after every module's `deploy` phase
Expand Down
2 changes: 1 addition & 1 deletion scripts/integration_test
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ cu::head_line_echo "build and test with Java $default_build_jdk_version: $JAVA_H
mvu::mvn_cmd clean install

########################################
# test by multiply version jdks
# test by multiple version jdks
########################################

# shellcheck disable=SC2034
Expand Down

0 comments on commit c15bf48

Please sign in to comment.