<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://jetty.org/configure_10_0.dtd">

<Configure>
  <New id="threadPool" class="org.eclipse.jetty.util.thread.QueuedThreadPool">
    <Set name="name" property="jetty.threadPool.namePrefix" />
    <Set name="minThreads" type="int"><Property name="jetty.threadPool.minThreads" deprecated="threads.min" default="10"/></Set>
    <Set name="maxThreads" type="int"><Property name="jetty.threadPool.maxThreads" deprecated="threads.max" default="200"/></Set>
    <Set name="reservedThreads" type="int"><Property name="jetty.threadPool.reservedThreads" default="-1"/></Set>
    <Set name="idleTimeout" type="int"><Property name="jetty.threadPool.idleTimeout" deprecated="threads.timeout" default="60000"/></Set>
    <Set name="maxEvictCount" type="int"><Property name="jetty.threadPool.maxEvictCount" default="1"/></Set>
    <Set name="detailedDump" type="boolean"><Property name="jetty.threadPool.detailedDump" default="false"/></Set>
    <Get id="namePrefix" name="name" />
    <Call name="setVirtualThreadsExecutor">
      <Arg>
        <New class="org.eclipse.jetty.util.thread.VirtualThreadPool">
          <Set name="name">
            <Property name="jetty.threadPool.virtual.namePrefix">
              <Default><Ref refid="namePrefix" />-virtual-</Default>
            </Property>
          </Set>
          <Set name="maxThreads" property="jetty.threadPool.virtual.maxThreads" />
          <Set name="tracking" property="jetty.threadPool.virtual.tracking" />
          <Set name="detailedDump" property="jetty.threadPool.detailedDump" />
        </New>
      </Arg>
    </Call>
  </New>

  <Call class="org.slf4j.LoggerFactory" name="getLogger">
    <Arg>org.eclipse.jetty</Arg>
    <Call name="info">
      <Arg>Virtual threads enabled. Using virtual threads for application tasks.</Arg>
    </Call>
  </Call>
</Configure>
