60 lines
4.1 KiB
HTML
60 lines
4.1 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="concept" />
|
|
<meta name="DC.Title" content="Suspend a thread" />
|
|
<meta name="abstract" content="It is sometimes useful to stop a thread temporarily from processing in your application. When you suspend a thread, the state of the thread, including all the attributes and locks held by the thread, is maintained until that thread is resumed." />
|
|
<meta name="description" content="It is sometimes useful to stop a thread temporarily from processing in your application. When you suspend a thread, the state of the thread, including all the attributes and locks held by the thread, is maintained until that thread is resumed." />
|
|
<meta name="DC.Relation" scheme="URI" content="rzahwtwoco.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzahwex6rx.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzahwsynco.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzahwcanco.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rzahwsus-susco" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Suspend a thread</title>
|
|
</head>
|
|
<body id="rzahwsus-susco"><a name="rzahwsus-susco"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Suspend a thread</h1>
|
|
<div><p>It is sometimes useful to stop a thread temporarily from
|
|
processing in your application. When you suspend a thread, the state of the
|
|
thread, including all the attributes and locks held by the thread, is maintained
|
|
until that thread is resumed.</p>
|
|
<p>Use thread suspension carefully. Suspending threads can easily cause application
|
|
deadlocks and timeout conditions. You can solve most problems that involve
|
|
thread suspension by using other safer mechanisms (such as synchronization
|
|
primitives). </p>
|
|
<div class="note"><span class="notetitle">Note:</span> The suspend method of the Java™ thread class has been deprecated. </div>
|
|
</div>
|
|
<div>
|
|
<ul class="ullinks">
|
|
<li class="ulchildlink"><strong><a href="rzahwex6rx.htm">Example: Suspend a thread using Java</a></strong><br />
|
|
This example shows a Java program suspending an actively running
|
|
thread.</li>
|
|
</ul>
|
|
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzahwtwoco.htm" title="The concepts described here pertain to all programming languages.">i5/OS thread management</a></div>
|
|
</div>
|
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
|
<div><a href="rzahwsynco.htm" title="When you create code that is threadsafe but still benefits from sharing data or resources between threads, the most important aspect of programming becomes the ability to synchronize threads.">Synchronization techniques among threads</a></div>
|
|
<div><a href="rzahwcanco.htm" title="The ability to end a thread externally allows you to cancel threads that run long requests before they are completed on their own. The methods available for canceling threads vary according to the threads API set that is used.">Cancel a thread</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |