You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-8Lines changed: 15 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,10 @@
2
2
An API that allows you to execute, parallelize, and async code dynamically, and simply.
3
3
4
4
> [!NOTE]
5
-
> > This is not a shaded project. If you plan on using it then you will
6
-
> > **Have** to have the dependency downloaded.
5
+
> > This is not a shaded project.
7
6
8
7
> [!WARNING]
9
-
> > This project is very early in development. Beware that the API will
8
+
> > This project is very early in development. Beware that the API **WILL**
10
9
> > change, although functionality will still be extremely performant and well > verse.
11
10
12
11
> [!NOTE]
@@ -57,7 +56,7 @@ public final MyPlugin extends JavaPlugin {
57
56
```
58
57
## Features & Methods
59
58
While there are sparse features, there is a large sum of methods you can use to suit your needs.
60
-
> [!FEATURES]
59
+
> ## Features
61
60
> - The ability to run code parallel.
62
61
> - The ability to run code async.
63
62
> - The ability to run code async, later joining it into the parent thread.
@@ -67,8 +66,8 @@ While there are sparse features, there is a large sum of methods you can use to
67
66
> [!NOTE]
68
67
> This is Extremely important to know,
69
68
> There are **TWO** types of AsyncTask's
70
-
> * Runnables
71
-
> * Returnables
69
+
> ***Runnables**
70
+
> ***Returnables**
72
71
>
73
72
> Runnables have a `AsyncTask<Void>` type
74
73
> Returnables have a `AsyncTask<?>` where `?` is **NOT**`Void`
@@ -118,8 +117,16 @@ While there are sparse features, there is a large sum of methods you can use to
118
117
> ### Behavior&HookingTasks
119
118
>
120
119
>While examples and explanations will be provided further down, we will provide clarifications here.
121
-
>Firstly, **Runnables** and **Returnables** can be converted between each other fluidly through **.after()**
122
-
>Secondly, `.after()` should not be used as a substitution for `.onComplete()` or other events tied to threads. See more about events after this section.
120
+
>1.Firstly, **Runnables** and **Returnables** can be converted between each other fluidly through `**.after()**`
121
+
>2.Secondly, `.after()` should not be used as a substitution for `.onComplete()` or other events tied to threads. See more about events after this section.
122
+
> ```java
123
+
>void main() {
124
+
>AsyncTask<Integer> runnableToReturnable =
125
+
>AsyncTask.of(() ->System.out.println("I Executed!")) // only a runnable
126
+
> .after(() ->15) // it's now a returnable of type "Integer"
127
+
> .start(); // start thread to execute, will print "I Executed" and nothing else.
0 commit comments