uvw/classuvw_1_1WorkReq.html
2017-10-11 09:11:53 +02:00

141 lines
6.3 KiB
HTML

<!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>uvw: uvw::WorkReq Class Reference</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="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></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">uvw
&#160;<span id="projectnumber">1.3.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceuvw.html">uvw</a></li><li class="navelem"><a class="el" href="classuvw_1_1WorkReq.html">WorkReq</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classuvw_1_1WorkReq-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">uvw::WorkReq Class Reference<span class="mlabels"><span class="mlabel">final</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>The <a class="el" href="classuvw_1_1WorkReq.html" title="The WorkReq request. ">WorkReq</a> request.
<a href="classuvw_1_1WorkReq.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="work_8hpp_source.html">work.hpp</a>&gt;</code></p>
<p>Inherits uvw::Request&lt; T, U &gt;.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:acfe5aad4cca7504dc39e10a64281456e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classuvw_1_1WorkReq.html#acfe5aad4cca7504dc39e10a64281456e">queue</a> ()</td></tr>
<tr class="memdesc:acfe5aad4cca7504dc39e10a64281456e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Runs the given task in a separate thread. <a href="#acfe5aad4cca7504dc39e10a64281456e">More...</a><br /></td></tr>
<tr class="separator:acfe5aad4cca7504dc39e10a64281456e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="classuvw_1_1WorkReq.html" title="The WorkReq request. ">WorkReq</a> request. </p>
<p>It runs user code using a thread from the threadpool and gets notified in the loop thread by means of an event.</p>
<p>To create a <code><a class="el" href="classuvw_1_1WorkReq.html" title="The WorkReq request. ">WorkReq</a></code> through a <code><a class="el" href="classuvw_1_1Loop.html" title="The Loop class. ">Loop</a></code>, arguments follow:</p>
<ul>
<li>A valid instance of a <code>Task</code>, that is of type <code>std::function&lt;void(void)&gt;</code>.</li>
</ul>
<p>See the official <a href="http://docs.libuv.org/en/v1.x/threadpool.html">documentation</a> for further details. </p>
<p class="definition">Definition at line <a class="el" href="work_8hpp_source.html#l00037">37</a> of file <a class="el" href="work_8hpp_source.html">work.hpp</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="acfe5aad4cca7504dc39e10a64281456e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acfe5aad4cca7504dc39e10a64281456e">&#9670;&nbsp;</a></span>queue()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void uvw::WorkReq::queue </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Runs the given task in a separate thread. </p>
<p>A <a class="el" href="structuvw_1_1WorkEvent.html" title="WorkEvent event. ">WorkEvent</a> event will be emitted on the loop thread when the task is finished.<br />
This request can be cancelled with <code>cancel()</code>. </p>
<p class="definition">Definition at line <a class="el" href="work_8hpp_source.html#l00058">58</a> of file <a class="el" href="work_8hpp_source.html">work.hpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/uvw/<a class="el" href="work_8hpp_source.html">work.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>