• <small id='cBeqv'></small><noframes id='cBeqv'>

  • <tfoot id='cBeqv'></tfoot>
    1. <i id='cBeqv'><tr id='cBeqv'><dt id='cBeqv'><q id='cBeqv'><span id='cBeqv'><b id='cBeqv'><form id='cBeqv'><ins id='cBeqv'></ins><ul id='cBeqv'></ul><sub id='cBeqv'></sub></form><legend id='cBeqv'></legend><bdo id='cBeqv'><pre id='cBeqv'><center id='cBeqv'></center></pre></bdo></b><th id='cBeqv'></th></span></q></dt></tr></i><div id='cBeqv'><tfoot id='cBeqv'></tfoot><dl id='cBeqv'><fieldset id='cBeqv'></fieldset></dl></div>
    2. <legend id='cBeqv'><style id='cBeqv'><dir id='cBeqv'><q id='cBeqv'></q></dir></style></legend>

          <bdo id='cBeqv'></bdo><ul id='cBeqv'></ul>
      1. boost::io_service poll_one 和 run_one 有什么区别?

        What#39;s the difference between boost::io_service poll_one and run_one?(boost::io_service poll_one 和 run_one 有什么区别?)

          <tfoot id='V2bt3'></tfoot>

                <tbody id='V2bt3'></tbody>
              <i id='V2bt3'><tr id='V2bt3'><dt id='V2bt3'><q id='V2bt3'><span id='V2bt3'><b id='V2bt3'><form id='V2bt3'><ins id='V2bt3'></ins><ul id='V2bt3'></ul><sub id='V2bt3'></sub></form><legend id='V2bt3'></legend><bdo id='V2bt3'><pre id='V2bt3'><center id='V2bt3'></center></pre></bdo></b><th id='V2bt3'></th></span></q></dt></tr></i><div id='V2bt3'><tfoot id='V2bt3'></tfoot><dl id='V2bt3'><fieldset id='V2bt3'></fieldset></dl></div>
              <legend id='V2bt3'><style id='V2bt3'><dir id='V2bt3'><q id='V2bt3'></q></dir></style></legend>
                <bdo id='V2bt3'></bdo><ul id='V2bt3'></ul>

              • <small id='V2bt3'></small><noframes id='V2bt3'>

                • 本文介绍了boost::io_service poll_one 和 run_one 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  io_service::poll_one 运行 io_service 对象的事件处理循环执行一个就绪处理程序.

                  io_service::poll_one Run the io_service object's event processing loop to execute one ready handler.

                  对比

                  io_service::run_one 运行 io_service 对象的事件处理循环最多执行一个处理程序.

                  io_service::run_one Run the io_service object's event processing loop to execute at most one handler.

                  从那个解释看来, poll_one 可以执行多个处理程序?run_one 或 poll_one 是使用任何名为 run() 的线程还是仅使用调用 poll_one/run_one 的线程?

                  From that explanation it would seem poll_one could execute more than one handler? Does run_one or poll_one use any thread that's called run() or only the thread that calls poll_one/run_one?

                  ASIO 的文档非常稀少.

                  The documentation for ASIO is very sparse.

                  推荐答案

                  poll_one 将立即返回(非阻塞),以防没有事件要处理.

                  poll_one will return immediately (non-blocking) in case there is no event to process.

                  run_one 将阻塞调用线程,直到一个事件准备好处理.

                  run_one will block the calling thread until one event is ready to process.

                  您还可以查看一些文档这里

                  这篇关于boost::io_service poll_one 和 run_one 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to limit the number of running instances in C++(C++中如何限制运行实例的数量)
                  Using boost::asio::async_read with stdin?(将 boost::asio::async_read 与 stdin 一起使用?)
                  How to find out what dependencies (i.e other Boost libraries) a particular Boost library requires?(如何找出特定 Boost 库需要哪些依赖项(即其他 Boost 库)?)
                  What#39;s the purpose of a leading quot;::quot; in a C++ method call(引导“::的目的是什么?在 C++ 方法调用中)
                  Boost Spirit x3: parse into structs(Boost Spirit x3:解析为结构体)
                  How boost auto-linking makes choice?(boost自动链接如何做出选择?)

                  • <bdo id='4kN4a'></bdo><ul id='4kN4a'></ul>

                      <small id='4kN4a'></small><noframes id='4kN4a'>

                      • <legend id='4kN4a'><style id='4kN4a'><dir id='4kN4a'><q id='4kN4a'></q></dir></style></legend>

                        <i id='4kN4a'><tr id='4kN4a'><dt id='4kN4a'><q id='4kN4a'><span id='4kN4a'><b id='4kN4a'><form id='4kN4a'><ins id='4kN4a'></ins><ul id='4kN4a'></ul><sub id='4kN4a'></sub></form><legend id='4kN4a'></legend><bdo id='4kN4a'><pre id='4kN4a'><center id='4kN4a'></center></pre></bdo></b><th id='4kN4a'></th></span></q></dt></tr></i><div id='4kN4a'><tfoot id='4kN4a'></tfoot><dl id='4kN4a'><fieldset id='4kN4a'></fieldset></dl></div>

                      • <tfoot id='4kN4a'></tfoot>
                          <tbody id='4kN4a'></tbody>