WangzJi commented on code in PR #8023:
URL: https://github.com/apache/incubator-seata/pull/8023#discussion_r3151883386


##########
threadpool-loom/src/main/java/org/apache/seata/common/thread/VirtualThreadPoolExecutor.java:
##########
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.seata.common.thread;
+
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.RejectedExecutionHandler;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Virtual-thread-backed thread pool implementation.
+ */
+public class VirtualThreadPoolExecutor extends ThreadPoolExecutor {
+
+    public VirtualThreadPoolExecutor(
+            String threadPrefix,
+            int corePoolSize,
+            int maximumPoolSize,
+            long keepAliveTime,
+            TimeUnit unit,
+            BlockingQueue<Runnable> workQueue,
+            boolean daemon,
+            RejectedExecutionHandler rejectedHandler) {
+        super(
+                corePoolSize,
+                maximumPoolSize,
+                keepAliveTime,
+                unit,
+                workQueue,
+                VirtualThreadFactoryHelper.newThreadFactory(threadPrefix, 
daemon),
+                rejectedHandler);

Review Comment:
   Just double-checked — the description still has the same wording 
(Integer.MAX_VALUE + SynchronousQueue + ignores maximumPoolSize/keepAliveTime), 
and the example code block still shows the old shape. VirtualThreadPoolExecutor 
on the latest head also still passes the caller bounds through. Could be a 
stale browser tab on my side though, mind sharing the diff or pointing me to 
the new wording?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to