Skip to content
This repository was archived by the owner on Feb 10, 2021. It is now read-only.

Commit 9aa98d0

Browse files
committed
Merge branch 'master' into exercise/completed
2 parents d5a4c0c + 712e610 commit 9aa98d0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crazy-lambdas/src/main/java/com/bobocode/CrazyLambdas.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,12 @@ public static Consumer<Runnable> newThreadRunnableConsumer() {
127127
return runnable -> new Thread(runnable).start();
128128
}
129129

130-
130+
/**
131+
* Returns a {@link Function} that accepts an instance of {@link Runnable} and returns a {@link Supplier} of a
132+
* started {@link Thread} that is created from a given {@link Runnable}
133+
*
134+
* @return a function that transforms runnable into a thread supplier
135+
*/
131136
public static Function<Runnable, Supplier<Thread>> runnableToThreadSupplierFunction() {
132137
return runnable -> () -> {
133138
Thread thread = new Thread(runnable);

0 commit comments

Comments
 (0)