Skip to content

Commit 6a6bd3b

Browse files
committed
1.68
1 parent a4b8367 commit 6a6bd3b

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package dev.felnull.fnjl;
22

33
public class FNJLBuildIn {
4-
protected static final String VERSION = "1.67";
4+
protected static final String VERSION = "1.68";
55
}

common/src/main/java/dev/felnull/fnjl/concurrent/InvokeExecutor.java

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,34 @@ public void execute(@NotNull Runnable command) {
2020
}
2121

2222
/**
23-
* タスクを実行する
23+
* すべてのタスクを実行する
24+
*
25+
* @return 実行したタスク数
2426
*/
25-
public void runTasks() {
26-
while (!tasks.isEmpty())
27+
public int runTasks() {
28+
int ct = 0;
29+
while (!tasks.isEmpty()) {
2730
tasks.poll().run();
31+
ct++;
32+
}
33+
return ct;
2834
}
2935

3036
/**
31-
* タスクを実行する
37+
* 最大指定した数のタスクをすべて実行する
3238
*
3339
* @param max 実行する最大タスク数
40+
* @return 実行したタスク数
3441
*/
35-
public void runTasks(int max) {
42+
public int runTasks(int max) {
3643
int ct = 0;
3744
while (!tasks.isEmpty()) {
3845
tasks.poll().run();
3946
ct++;
4047
if (ct >= max)
4148
break;
4249
}
50+
return ct;
4351
}
4452

4553
/**

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
fnjl_group=dev.felnull
22
fnjl_name=felnull-java-library
3-
fnjl_version=1.67
3+
fnjl_version=1.68
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package dev.felnull.fnjln;
22

33
public class FNJLNBuildIn {
4-
protected static final String VERSION = "1.67";
4+
protected static final String VERSION = "1.68";
55

66
protected static final int NATIVE_LIBRARY_VERSION = 1;
77
}

0 commit comments

Comments
 (0)