2018-12-21 11:20:43 +01:00
|
|
|
<!DOCTYPE html>
|
2006-09-11 04:19:00 +00:00
|
|
|
<!--
|
|
|
|
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
|
|
|
|
|
2019-05-25 13:41:47 +02:00
|
|
|
https://www.apache.org/licenses/LICENSE-2.0
|
2006-09-11 04:19:00 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
-->
|
2018-12-21 11:20:43 +01:00
|
|
|
<html lang="en">
|
2004-03-12 15:11:35 +00:00
|
|
|
|
|
|
|
<head>
|
2005-04-29 18:58:16 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
2004-03-12 15:11:35 +00:00
|
|
|
<title>Nice Task</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
2018-01-22 23:52:21 +01:00
|
|
|
<h2 id="echo">Nice</h2>
|
2004-03-12 15:11:35 +00:00
|
|
|
<h3>Description</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>Provide "nice-ness" to the current thread and/or query the current value.</p>
|
2004-03-12 15:11:35 +00:00
|
|
|
<h3>Parameters</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<table class="attr">
|
2004-03-12 15:11:35 +00:00
|
|
|
<tr>
|
2018-05-15 10:29:27 +02:00
|
|
|
<th scope="col">Attribute</th>
|
|
|
|
<th scope="col">Description</th>
|
|
|
|
<th scope="col">Required</th>
|
2004-03-12 15:11:35 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>currentpriority</td>
|
|
|
|
<td>name of the property whose value should be set to the current "nice-ness"
|
|
|
|
level.</td>
|
|
|
|
<td>No</td>
|
2004-03-12 15:11:35 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>newpriority</td>
|
|
|
|
<td>value to which the "nice-ness" level should be set. Must be a valid Java Thread
|
|
|
|
priority.</td>
|
|
|
|
<td>No</td>
|
2004-03-12 15:11:35 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
2018-05-15 09:51:58 +02:00
|
|
|
|
2004-03-12 15:11:35 +00:00
|
|
|
<h3>Examples</h3>
|
2018-05-15 09:51:58 +02:00
|
|
|
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>Set the Thread priority to 10 (highest).</p>
|
2018-05-15 09:51:58 +02:00
|
|
|
<pre><nice newpriority="10"/></pre>
|
|
|
|
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>Store the current Thread priority in the user property <code>priority</code>.</p>
|
2018-05-15 09:51:58 +02:00
|
|
|
<pre><nice currentpriority="priority"/></pre>
|
|
|
|
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>Set the current Thread priority to 1 (lowest), storing the original priority in the user
|
2018-05-15 09:51:58 +02:00
|
|
|
property <code>currentpriority</code>. This can be used to set the priority back to its original
|
2018-02-28 07:58:59 +01:00
|
|
|
value later.</p>
|
2018-05-15 09:51:58 +02:00
|
|
|
<pre><nice currentpriority="currentpriority" newpriority="1"/></pre>
|
2004-03-12 15:11:35 +00:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|