Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > a41e5ac5fb332416cb8019ae392f1f99 > files > 205

lib64pulseaudio-devel-10.0-1.1.mga6.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PulseAudio: Main Loop</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">PulseAudio
   &#160;<span id="projectnumber">10.0.0-1.1.mga6</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('mainloop.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Main Loop </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="overv_sec"></a>
Overview</h1>
<p>The built-in main loop implementation is based on the poll() system call. It supports the functions defined in the main loop abstraction and very little else.</p>
<p>The main loop is created using <a class="el" href="mainloop_8h.html#ad6c767781474275159c0a5f3f7e2ecb5" title="Allocate a new main loop object. ">pa_mainloop_new()</a> and destroyed using <a class="el" href="mainloop_8h.html#a6c6ea37ce2815640f7f1a133f845f8e7" title="Free a main loop object. ">pa_mainloop_free()</a>. To get access to the main loop abstraction, <a class="el" href="mainloop_8h.html#a9e5b510dabb4eb1a01645c4db65b9ddb" title="Return the abstract main loop abstraction layer vtable for this main loop. ">pa_mainloop_get_api()</a> is used.</p>
<h1><a class="anchor" id="iter_sec"></a>
Iteration</h1>
<p>The main loop is designed around the concept of iterations. Each iteration consists of three steps that repeat during the application's entire lifetime:</p>
<ol type="1">
<li>Prepare - Build a list of file descriptors that need to be monitored and calculate the next timeout.</li>
<li>Poll - Execute the actual poll() system call.</li>
<li>Dispatch - Dispatch any events that have fired.</li>
</ol>
<p>When using the main loop, the application can either execute each iteration, one at a time, using <a class="el" href="mainloop_8h.html#a491422aebe5487800d8be0bf4153cb81" title="Run a single iteration of the main loop. ">pa_mainloop_iterate()</a>, or let the library iterate automatically using <a class="el" href="mainloop_8h.html#afbcd8f4eba09cdfd5323ac9db3718ae8" title="Run unlimited iterations of the main loop object until the main loop&#39;s quit() routine is called...">pa_mainloop_run()</a>.</p>
<h1><a class="anchor" id="thread_sec"></a>
Threads</h1>
<p>The main loop functions are designed to be thread safe, but the objects are not. What this means is that multiple main loops can be used, but only one object per thread. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="index.html">index</a></li><li class="navelem"><a class="el" href="async.html">Asynchronous API</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>