feat: имена потоков
- добавлены имена для потоков CallbackHelper
This commit is contained in:
@@ -59,6 +59,7 @@ public class CallbackHelper {
|
|||||||
|
|
||||||
public static void registerCallback(Type type) {
|
public static void registerCallback(Type type) {
|
||||||
ThreadRegion threadRegion = new ThreadRegion();
|
ThreadRegion threadRegion = new ThreadRegion();
|
||||||
|
threadRegion.setName(type.name());
|
||||||
threadRegion.start();
|
threadRegion.start();
|
||||||
|
|
||||||
types.put(type, threadRegion);
|
types.put(type, threadRegion);
|
||||||
@@ -130,6 +131,7 @@ public class CallbackHelper {
|
|||||||
|
|
||||||
public static void apply(Event event, ICallbackApply apply, boolean isPrevented) {
|
public static void apply(Event event, ICallbackApply apply, boolean isPrevented) {
|
||||||
Thread thread = new ThreadCallbackEvent(event, apply, isPrevented);
|
Thread thread = new ThreadCallbackEvent(event, apply, isPrevented);
|
||||||
|
thread.setName(event.getEventName());
|
||||||
thread.start();
|
thread.start();
|
||||||
while (thread.isAlive()) {
|
while (thread.isAlive()) {
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user