⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class_plugin_thread_pool_1_1_command.html

📁 用vc++写的一个简单的线程池的代码
💻 HTML
📖 第 1 页 / 共 3 页
字号:
          <td class="paramkey"></td>          <td></td>          <td class="paramtype">long&nbsp;</td>          <td class="paramname"> <em>priority</em> = <code><a class="el" href="namespace_plugin_thread_pool.html#ce744b8830668fc53d7c97b3c77d7ce4">PRIO_NORMAL</a></code></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"><code> [inline, explicit]</code></td>        </tr>      </table></div><div class="memdoc"><p><p>Definition at line <a class="el" href="_command_8h-source.html#l00166">166</a> of file <a class="el" href="_command_8h-source.html">Command.h</a>.<p>References <a class="el" href="_command_8h-source.html#l00144">PluginThreadPool::Command&lt; T &gt;::method0</a>.</div></div><p><a class="anchor" name="261bc0b38f8c4f79676d987da62f3202"></a><!-- doxytag: member="PluginThreadPool::Command::Command" ref="261bc0b38f8c4f79676d987da62f3202" args="(T *pObj, F1 *p_method, int par1, long timeout, const char *key, long priority=PRIO_NORMAL)" --><div class="memitem"><div class="memproto"><div class="memtemplate">template&lt;typename T&gt; </div>      <table class="memname">        <tr>          <td class="memname"><a class="el" href="class_plugin_thread_pool_1_1_command.html">PluginThreadPool::Command</a>&lt; T &gt;::<a class="el" href="class_plugin_thread_pool_1_1_command.html">Command</a>           </td>          <td>(</td>          <td class="paramtype">T *&nbsp;</td>          <td class="paramname"> <em>pObj</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype"><a class="el" href="class_plugin_thread_pool_1_1_command.html#85b52dc64e486eac2c2c4d9db92b9b3c">F1</a> *&nbsp;</td>          <td class="paramname"> <em>p_method</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">int&nbsp;</td>          <td class="paramname"> <em>par1</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">long&nbsp;</td>          <td class="paramname"> <em>timeout</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>key</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">long&nbsp;</td>          <td class="paramname"> <em>priority</em> = <code><a class="el" href="namespace_plugin_thread_pool.html#ce744b8830668fc53d7c97b3c77d7ce4">PRIO_NORMAL</a></code></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"><code> [inline, explicit]</code></td>        </tr>      </table></div><div class="memdoc"><p><p>Definition at line <a class="el" href="_command_8h-source.html#l00174">174</a> of file <a class="el" href="_command_8h-source.html">Command.h</a>.<p>References <a class="el" href="_command_8h-source.html#l00151">PluginThreadPool::Command&lt; T &gt;::m_par1</a>, and <a class="el" href="_command_8h-source.html#l00145">PluginThreadPool::Command&lt; T &gt;::method1</a>.</div></div><p><a class="anchor" name="16303fccc096391663a44d236b7a6bb2"></a><!-- doxytag: member="PluginThreadPool::Command::Command" ref="16303fccc096391663a44d236b7a6bb2" args="(T *pObj, F3 *p_method, long timeout, const char *key, long priority=PRIO_NORMAL)" --><div class="memitem"><div class="memproto"><div class="memtemplate">template&lt;typename T&gt; </div>      <table class="memname">        <tr>          <td class="memname"><a class="el" href="class_plugin_thread_pool_1_1_command.html">PluginThreadPool::Command</a>&lt; T &gt;::<a class="el" href="class_plugin_thread_pool_1_1_command.html">Command</a>           </td>          <td>(</td>          <td class="paramtype">T *&nbsp;</td>          <td class="paramname"> <em>pObj</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype"><a class="el" href="class_plugin_thread_pool_1_1binder3.html">F3</a> *&nbsp;</td>          <td class="paramname"> <em>p_method</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">long&nbsp;</td>          <td class="paramname"> <em>timeout</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>key</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">long&nbsp;</td>          <td class="paramname"> <em>priority</em> = <code><a class="el" href="namespace_plugin_thread_pool.html#ce744b8830668fc53d7c97b3c77d7ce4">PRIO_NORMAL</a></code></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"><code> [inline, explicit]</code></td>        </tr>      </table></div><div class="memdoc"><p><p>Definition at line <a class="el" href="_command_8h-source.html#l00183">183</a> of file <a class="el" href="_command_8h-source.html">Command.h</a>.<p>References <a class="el" href="_command_8h-source.html#l00146">PluginThreadPool::Command&lt; T &gt;::method3</a>.</div></div><p><a class="anchor" name="89490137659a8ff9d66c16eb7d72b0c5"></a><!-- doxytag: member="PluginThreadPool::Command::~Command" ref="89490137659a8ff9d66c16eb7d72b0c5" args="()" --><div class="memitem"><div class="memproto"><div class="memtemplate">template&lt;typename T&gt; </div>      <table class="memname">        <tr>          <td class="memname"><a class="el" href="class_plugin_thread_pool_1_1_command.html">PluginThreadPool::Command</a>&lt; T &gt;::~<a class="el" href="class_plugin_thread_pool_1_1_command.html">Command</a>           </td>          <td>(</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [inline]</code></td>        </tr>      </table></div><div class="memdoc"><p>Deletes the <a class="el" href="class_plugin_thread_pool_1_1_command.html">Command</a> objecy Note do not call 'delete m_objptr' as we do not own this <p>Definition at line <a class="el" href="_command_8h-source.html#l00238">238</a> of file <a class="el" href="_command_8h-source.html">Command.h</a>.</div></div><p><hr><h2>Member Function Documentation</h2><a class="anchor" name="bae83347a5d0fd5063355525f06a4ed0"></a><!-- doxytag: member="PluginThreadPool::Command::execute" ref="bae83347a5d0fd5063355525f06a4ed0" args="()" --><div class="memitem"><div class="memproto"><div class="memtemplate">template&lt;typename T&gt; </div>      <table class="memname">        <tr>          <td class="memname">void <a class="el" href="class_plugin_thread_pool_1_1_command.html">PluginThreadPool::Command</a>&lt; T &gt;::execute           </td>          <td>(</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [inline]</code></td>        </tr>      </table></div><div class="memdoc"><p>Calls the method of the object. <p><p>Definition at line <a class="el" href="_command_8h-source.html#l00191">191</a> of file <a class="el" href="_command_8h-source.html">Command.h</a>.<p>References <a class="el" href="_command_8h-source.html#l00129">PluginThreadPool::Command&lt; T &gt;::m_objptr</a>, <a class="el" href="_command_8h-source.html#l00151">PluginThreadPool::Command&lt; T &gt;::m_par1</a>, <a class="el" href="class_plugin_thread_pool_1_1_command.html#7552d1a7c1afc09dcdd886e7ade68789">PluginThreadPool::Command&lt; T &gt;::method</a>, <a class="el" href="_command_8h-source.html#l00144">PluginThreadPool::Command&lt; T &gt;::method0</a>, <a class="el" href="_command_8h-source.html#l00145">PluginThreadPool::Command&lt; T &gt;::method1</a>, and <a class="el" href="_command_8h-source.html#l00146">PluginThreadPool::Command&lt; T &gt;::method3</a>.<p>Referenced by <a class="el" href="_thread_chain_8h-source.html#l00118">PluginThreadPool::ThreadChain&lt; T &gt;::HandleRequest()</a>.</div></div><p><a class="anchor" name="febd44d2f529c23fe396c5b2b7b6371f"></a><!-- doxytag: member="PluginThreadPool::Command::GetKey" ref="febd44d2f529c23fe396c5b2b7b6371f" args="()" --><div class="memitem"><div class="memproto"><div class="memtemplate">template&lt;typename T&gt; </div>      <table class="memname">        <tr>          <td class="memname">unsigned int <a class="el" href="class_plugin_thread_pool_1_1_command.html">PluginThreadPool::Command</a>&lt; T &gt;::GetKey           </td>          <td>(</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [inline]</code></td>        </tr>      </table></div><div class="memdoc"><p>return a key associated with this command object <p><p>Definition at line <a class="el" href="_command_8h-source.html#l00224">224</a> of file <a class="el" href="_command_8h-source.html">Command.h</a>.<p>References <a class="el" href="_command_8h-source.html#l00149">PluginThreadPool::Command&lt; T &gt;::m_key</a>, and <a class="el" href="_command_8h-source.html#l00244">PluginThreadPool::Command&lt; T &gt;::RSHash()</a>.<p>Referenced by <a class="el" href="_request_queue_8h-source.html#l00060">PluginThreadPool::CRequestQueue&lt; T &gt;::QueueRequest()</a>.</div></div><p><a class="anchor" name="2830b94ad2a119732a997ee16caf71ac"></a><!-- doxytag: member="PluginThreadPool::Command::GetTimeOut" ref="2830b94ad2a119732a997ee16caf71ac" args="()" --><div class="memitem"><div class="memproto"><div class="memtemplate">template&lt;typename T&gt; </div>      <table class="memname">        <tr>          <td class="memname">unsigned long <a class="el" href="class_plugin_thread_pool_1_1_command.html">PluginThreadPool::Command</a>&lt; T &gt;::GetTimeOut           </td>          <td>(</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [inline]</code></td>        </tr>      </table></div><div class="memdoc"><p>This is the timout value beyond which if this task's excecute method takes it is deemed as hanging NOTE - Timeout is in seconds <p>Definition at line <a class="el" href="_command_8h-source.html#l00217">217</a> of file <a class="el" href="_command_8h-source.html">Command.h</a>.<p>References <a class="el" href="_command_8h-source.html#l00148">PluginThreadPool::Command&lt; T &gt;::m_timeout</a>.<p>Referenced by <a class="el" href="_thread_chain_8h-source.html#l00118">PluginThreadPool::ThreadChain&lt; T &gt;::HandleRequest()</a>, <a class="el" href="test_8cpp-source.html#l00145">main()</a>, and <a class="el" href="test_8cpp-source.html#l00217">SecondThread()</a>.</div></div><p><a class="anchor" name="c0f4bb7f637556ceabce1575f5ea6112"></a><!-- doxytag: member="PluginThreadPool::Command::operator&lt;" ref="c0f4bb7f637556ceabce1575f5ea6112" args="(const Command&lt; T &gt; &amp;a) const " --><div class="memitem"><div class="memproto">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -