< prev index next >

test/jdk/java/nio/channels/vthread/SelectorOps.java

Print this page

 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  */
 23 
 24 /*
 25  * @test id=default
 26  * @summary Test virtual threads doing selection operations
 27  * @library /test/lib
 28  * @run junit/othervm/native --enable-native-access=ALL-UNNAMED SelectorOps
 29  */
 30 
 31 /*
 32  * @test id=poller-modes
 33  * @requires (os.family == "linux") | (os.family == "mac")
 34  * @library /test/lib
 35  * @run junit/othervm/native -Djdk.pollerMode=1 --enable-native-access=ALL-UNNAMED SelectorOps
 36  * @run junit/othervm/native -Djdk.pollerMode=2 --enable-native-access=ALL-UNNAMED SelectorOps










 37  */
 38 
 39 /*
 40  * @test id=no-vmcontinuations
 41  * @requires vm.continuations
 42  * @library /test/lib
 43  * @run junit/othervm/native -XX:+UnlockExperimentalVMOptions -XX:-VMContinuations
 44  *     --enable-native-access=ALL-UNNAMED SelectorOps
 45  */
 46 
 47 import java.io.IOException;
 48 import java.nio.ByteBuffer;
 49 import java.nio.channels.Pipe;
 50 import java.nio.channels.SelectionKey;
 51 import java.nio.channels.Selector;
 52 import java.nio.charset.StandardCharsets;
 53 import java.util.Arrays;
 54 import java.util.concurrent.TimeUnit;
 55 
 56 import jdk.test.lib.thread.VThreadRunner;

 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  */
 23 
 24 /*
 25  * @test id=default
 26  * @summary Test virtual threads doing selection operations
 27  * @library /test/lib
 28  * @run junit/othervm/native --enable-native-access=ALL-UNNAMED SelectorOps
 29  */
 30 
 31 /*
 32  * @test id=poller-modes
 33  * @requires (os.family == "linux") | (os.family == "mac")
 34  * @library /test/lib
 35  * @run junit/othervm/native -Djdk.pollerMode=1 --enable-native-access=ALL-UNNAMED SelectorOps
 36  * @run junit/othervm/native -Djdk.pollerMode=2 --enable-native-access=ALL-UNNAMED SelectorOps
 37  * @run junit/othervm/native -Djdk.pollerMode=3 --enable-native-access=ALL-UNNAMED SelectorOps
 38  */
 39 
 40 /*
 41  * @test id=io_uring
 42  * @requires os.family == "linux"
 43  * @library /test/lib
 44  * @run junit/othervm -Djdk.pollerMode=1 -Djdk.io_uring=true --enable-native-access=ALL-UNNAMED SelectorOps
 45  * @run junit/othervm -Djdk.pollerMode=2 -Djdk.io_uring=true --enable-native-access=ALL-UNNAMED SelectorOps
 46  * @run junit/othervm -Djdk.pollerMode=3 -Djdk.io_uring=true --enable-native-access=ALL-UNNAMED SelectorOps
 47  */
 48 
 49 /*
 50  * @test id=no-vmcontinuations
 51  * @requires vm.continuations
 52  * @library /test/lib
 53  * @run junit/othervm/native -XX:+UnlockExperimentalVMOptions -XX:-VMContinuations
 54  *     --enable-native-access=ALL-UNNAMED SelectorOps
 55  */
 56 
 57 import java.io.IOException;
 58 import java.nio.ByteBuffer;
 59 import java.nio.channels.Pipe;
 60 import java.nio.channels.SelectionKey;
 61 import java.nio.channels.Selector;
 62 import java.nio.charset.StandardCharsets;
 63 import java.util.Arrays;
 64 import java.util.concurrent.TimeUnit;
 65 
 66 import jdk.test.lib.thread.VThreadRunner;
< prev index next >