Skip to content

Commit

Permalink
Updates from review
Browse files Browse the repository at this point in the history
  • Loading branch information
gregw committed May 6, 2024
1 parent 061be04 commit 34e1ea2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Call class="org.slf4j.LoggerFactory" name="getLogger">
<Arg>org.eclipse.jetty</Arg>
<Call name="info">
<Arg>Virtual threads enabled. Using all virtual threads.</Arg>
<Arg>Virtual threads enabled. Using virtual threads for all Jetty tasks.</Arg>
</Call>
</Call>
</Configure>
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<Call class="org.slf4j.LoggerFactory" name="getLogger">
<Arg>org.eclipse.jetty</Arg>
<Call name="info">
<Arg>Virtual threads are enabled.</Arg>
<Arg>Virtual threads enabled. Using virtual threads only for application tasks.</Arg>
</Call>
</Call>
</Configure>
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class TrackingExecutor implements Executor, Dumpable
private final Set<Thread> _threads = ConcurrentHashMap.newKeySet();
private boolean _detailed;

TrackingExecutor(Executor executor, boolean detailed)
public TrackingExecutor(Executor executor, boolean detailed)
{
_threadFactoryExecutor = executor;
_detailed = detailed;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,24 @@ public void setName(String name)
_name = name;
}

/**
*
* @return {@code true} if the virtual threads will be tracked.
* @see TrackingExecutor
*/
@ManagedAttribute("virtual threads are tracked")
public boolean isTracking()
{
return _tracking;
}

public void setTracking(boolean tracking)
{
if (isRunning())
throw new IllegalStateException(getState());
_tracking = tracking;
}

public boolean isTracking()
{
return _tracking;
}

@ManagedAttribute("reports additional details in the dump")
public boolean isDetailedDump()
{
Expand All @@ -99,7 +105,7 @@ public void setDetailedDump(boolean detailedDump)
@Override
protected void doStart() throws Exception
{
_main = new Thread("keepalive")
_main = new Thread("jetty-virtual-thread-pool-keepalive")
{
@Override
public void run()
Expand Down

0 comments on commit 34e1ea2

Please sign in to comment.