Skip to content

Commit 7e48614

Browse files
committed
changed from meowlib to yystal (only for async)
1 parent ad62944 commit 7e48614

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

pisi/unitedmeows/eventapi/event/listener/AsyncAwaitListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ public void call(Event event) {
2727
}
2828
}
2929

30-
pisi.unitedmeows.meowlib.async.Async.await(pisi.unitedmeows.meowlib.async.Async.async(f -> {
30+
pisi.unitedmeows.yystal.parallel.Async.await(() -> {
3131
this.function.call((X) event);
32-
}));
32+
});
3333
}
3434
}
3535
}

pisi/unitedmeows/eventapi/event/listener/AsyncListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public void call(Event event) {
2626
}
2727
}
2828

29-
pisi.unitedmeows.meowlib.async.Async.async(f -> {
29+
pisi.unitedmeows.yystal.parallel.Async.async(() -> {
3030
this.function.call((X) event);
3131
});
3232
}

test/PisiTest.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
package test;
22

33
import pisi.unitedmeows.eventapi.event.Event;
4-
import pisi.unitedmeows.eventapi.event.IFunction;
54
import pisi.unitedmeows.eventapi.event.listener.Listener;
65
import pisi.unitedmeows.eventapi.system.BasicEventSystem;
7-
import pisi.unitedmeows.meowlib.async.Async;
8-
import pisi.unitedmeows.meowlib.thread.kThread;
96

10-
import java.util.Random;
7+
import java.util.HashMap;
118

129
public class PisiTest {
1310

@@ -35,6 +32,7 @@ public static void main(String[] args) {
3532
for (int i = 1000000; i > 0; i--) {
3633
basicEventSystem.fire(new PisiTestEvent());
3734
}
35+
System.out.print("1M call took ");
3836
stopWatcher();
3937

4038
}
@@ -47,7 +45,7 @@ public static void startWatcher() {
4745

4846
public static void stopWatcher() {
4947
long lastTime = System.currentTimeMillis();
50-
System.out.println(lastTime - time + " ms took");
48+
System.out.println(lastTime - time + "ms");
5149
}
5250

5351
}

0 commit comments

Comments
 (0)