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

78 lines
5.7 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="Common multithreaded programming errors" />
<meta name="abstract" content="Several programming errors often occur when writing multithreaded applications." />
<meta name="description" content="Several programming errors often occur when writing multithreaded applications." />
<meta name="DC.Relation" scheme="URI" content="rzahwmulco.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahwnsfco.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahwfaico.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahwterco.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahwmixco.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahwmitco.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahwdioco.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahwoneco.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahwnonco.htm" />
<meta name="DC.Relation" scheme="URI" content="../apis/trouble.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahwbugco.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahwbugco.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="rzahwcom-comco" />
<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>Common multithreaded programming errors</title>
</head>
<body id="rzahwcom-comco"><a name="rzahwcom-comco"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Common multithreaded programming errors</h1>
<div><p>Several programming errors often occur when writing multithreaded
applications.</p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rzahwnsfco.htm">Calling functions that are not threadsafe</a></strong><br />
The most common programming error when writing a threaded application is the use of APIs or system services that are not thread safe.</li>
<li class="ulchildlink"><strong><a href="rzahwfaico.htm">Thread creation not allowed failure</a></strong><br />
<span class="keyword">i5/OS™</span> does not
allow every process on the system to create threads at every time while running.</li>
<li class="ulchildlink"><strong><a href="rzahwterco.htm">Activation group ending</a></strong><br />
The <span class="keyword">i5/OS™</span> Integrated
Language Environment<sup>®</sup> (ILE) program model uses activation groups as a
way to encapsulate resources for an application program within a job.</li>
<li class="ulchildlink"><strong><a href="rzahwmixco.htm">Mixing thread models</a></strong><br />
Do not mix Pthreads APIs with other thread management APIs that might be provided by the system.</li>
<li class="ulchildlink"><strong><a href="rzahwmitco.htm">Commit operations in multithreaded programs</a></strong><br />
Database transactions in <span class="keyword">i5/OS™</span> are
scoped to the job or the activation group.</li>
<li class="ulchildlink"><strong><a href="rzahwdioco.htm">Database record I/O and thread safety</a></strong><br />
You can use the I/O feedback area of a database file to communicate results of I/O operations to the record I/O user. A typical application might have problems with thread safety because of the nature of the feedback area.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzahwmulco.htm" title="If you are going to write multithreaded applications or server applications for i5/OS, you should be familiar with several techniques.">Multithreaded programming techniques</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rzahwoneco.htm" title="At times, you might want to defer the initialization of resources until a thread requires them. However, your application might require that multiple threads use a certain resource, which requires you to initialize the resource only once in a threadsafe way.">One-time initialization and thread safety</a></div>
<div><a href="rzahwnonco.htm" title="Your multithreaded application at times requires access to functions or system services that are not thread safe. There are few completely safe alternatives for calling these functions.">Function calls that are not thread safe</a></div>
<div><a href="rzahwbugco.htm" title="Use the concepts and techniques that are described here to learn about debugging and servicing multithreaded jobs:">Debugging and servicing of multithreaded jobs</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../apis/trouble.htm">Troubleshooting pthread errors</a></div>
</div>
</div>
</body>
</html>