From 7a934a70f801d73906c665454989f1635e6229a3 Mon Sep 17 00:00:00 2001 From: godotg Date: Thu, 21 Sep 2023 21:24:51 +0800 Subject: [PATCH] build[release]: first release --- .github/workflows/maven.yml | 2 +- event/src/main/java/com/zfoo/event/manager/EventBus.java | 1 - net/src/main/java/com/zfoo/net/router/Router.java | 1 - .../java/com/zfoo/protocol/util/FastThreadLocalAdapter.java | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 34b616977..3a8b99414 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 21 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: java-version: '17' diff --git a/event/src/main/java/com/zfoo/event/manager/EventBus.java b/event/src/main/java/com/zfoo/event/manager/EventBus.java index a9be1cb97..17c8ef18e 100644 --- a/event/src/main/java/com/zfoo/event/manager/EventBus.java +++ b/event/src/main/java/com/zfoo/event/manager/EventBus.java @@ -103,7 +103,6 @@ public static void post(IEvent event) { switch (receiver.bus()) { case CurrentThread -> doReceiver(receiver, event); case AsyncThread -> execute(event.executorHash(), () -> doReceiver(receiver, event)); - case VirtualThread -> Thread.ofVirtual().name("virtual-on" + clazz.getSimpleName()).start(() -> doReceiver(receiver, event)); } } } diff --git a/net/src/main/java/com/zfoo/net/router/Router.java b/net/src/main/java/com/zfoo/net/router/Router.java index 0b7217abe..6de20e30f 100644 --- a/net/src/main/java/com/zfoo/net/router/Router.java +++ b/net/src/main/java/com/zfoo/net/router/Router.java @@ -204,7 +204,6 @@ public void dispatchByTaskExecutorHash(int taskExecutorHash, PacketReceiverTask switch (receiver.task()) { case TaskBus -> TaskBus.execute(taskExecutorHash, packetReceiverTask); case NettyIO -> atReceiver(packetReceiverTask); - case VirtualThread -> Thread.ofVirtual().name("virtual-at" + clazz.getSimpleName()).start(() -> atReceiver(packetReceiverTask)); } } diff --git a/protocol/src/main/java/com/zfoo/protocol/util/FastThreadLocalAdapter.java b/protocol/src/main/java/com/zfoo/protocol/util/FastThreadLocalAdapter.java index 15dec1d48..c7da17cfc 100644 --- a/protocol/src/main/java/com/zfoo/protocol/util/FastThreadLocalAdapter.java +++ b/protocol/src/main/java/com/zfoo/protocol/util/FastThreadLocalAdapter.java @@ -24,6 +24,6 @@ protected T initialValue() { } public T get() { - return Thread.currentThread().isVirtual() ? supplier.get() : fastThreadLocal.get(); + return fastThreadLocal.get(); } }