Skip to content

Commit

Permalink
Merge pull request jakartaee#408 from njr-11/268-additional-limitatio…
Browse files Browse the repository at this point in the history
…ns-if-using-virtual-threads

document additional limitations if using virtual threads
  • Loading branch information
njr-11 authored Jan 12, 2024
2 parents 75e2b37 + 7738c6d commit 0123b28
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -18,9 +18,10 @@

/**
*
* Interface to be implemented by the Jakarta™ EE product providers on threads
* that are created by calling
* Interface to be implemented by the Jakarta™ EE product providers
* on platform threads that are created by calling
* {@link ManagedThreadFactory#newThread(java.lang.Runnable) }.
* Virtual threads do not implement {@code ManageableThread}.
*
* @since 1.0
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -34,8 +34,9 @@
* Component Provider and Deployer identify these requirements and map the
* resource environment reference appropriately.<p>
*
* Threads returned from the {@code newThread()} method should implement the
* {@link ManageableThread} interface.
* Platform threads returned from the {@code newThread()} method should implement the
* {@link ManageableThread} interface. Virtual threads do not implement
* {@code ManageableThread}.
*
* The Runnable task that is allocated to the new thread using the
* {@link ThreadFactory#newThread(Runnable)} method
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021,2023 Contributors to the Eclipse Foundation
* Copyright (c) 2021,2024 Contributors to the Eclipse Foundation
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -159,7 +159,9 @@
String context() default "java:comp/DefaultContextService";

/**
* <p>Priority for threads created by this thread factory.</p>
* <p>Priority for platform threads created by this thread factory.
* Virtual threads always have the priority {@link java.lang.Thread#NORM_PRIORITY}
* regardless of this setting.</p>
*
* <p>The default is {@link java.lang.Thread#NORM_PRIORITY}.</p>
*
Expand Down
6 changes: 3 additions & 3 deletions specification/src/main/asciidoc/jakarta-concurrency.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:sectnums:
= Jakarta Concurrency Specification, Version 3.1

Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.

Oracle and Java are registered trademarks of Oracle and/or its
affiliates. Other names may be trademarks of their respective owners.
Expand Down Expand Up @@ -2164,8 +2164,8 @@ attributes. See EE.5.8.2 for details.
The Jakarta EE Product Provider’s responsibilities are as defined in
EE.5.8.3 and must support the following:

* Threads returned by the `newThread()` method must implement the
`ManageableThread` interface.
* Platform threads returned by the `newThread()` method must implement the
`ManageableThread` interface. Virtual threads do not implement `ManageableThread`.
* When a `ManagedThreadFactory` instance is stopped, such as when the
component that created it is stopped or when the application server is
shutting down, all threads that it has created using the `newThread()`
Expand Down

0 comments on commit 0123b28

Please sign in to comment.