ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahw_5.4.0.1/rzahwyieco.htm

53 lines
3.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="reference" />
<meta name="DC.Title" content="Yield the processor to another thread" />
<meta name="abstract" content="At times, your application can benefit when a thread yields the processor to another thread in the system." />
<meta name="description" content="At times, your application can benefit when a thread yields the processor to another thread in the system." />
<meta name="DC.Relation" scheme="URI" content="rzahwtwoco.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="rzahwyie-yieco" />
<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>Yield the processor to another thread</title>
</head>
<body id="rzahwyie-yieco"><a name="rzahwyie-yieco"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Yield the processor to another thread</h1>
<div><p>At times, your application can benefit when a thread yields the
processor to another thread in the system.</p>
<div class="section"><p>When a thread yields the processor, it immediately allows another
equal or higher priority thread that is active in the system to run. If no
threads of at least equal priority are currently ready to run, yielding the
processor has no effect. Beyond the immediate action, yielding the processor
does not have any additional predictable behavior related to the scheduling
of the threads in the system.</p>
</div>
<div class="section"><p>The iSeries™ server
provides a fully preemptive multitasking scheduling algorithm. A thread that
exists in a well-written application should seldom need to yield the processor
to other threads. This is because more predictable application programming
interfaces (APIs) for synchronizing threads are available.</p>
</div>
</div>
<div>
<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>
</body>
</html>