Apostolos Manolitzas
2014-06-06 12:16:24 UTC
Hello all,
based on the example
http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/example/cpp03/timeouts/blocking_udp_client.cpp
I forked the pattern to my application, but by using the linux perf tool
<https://perf.wiki.kernel.org/index.php/Main_Page> I noticed that in the
loop
// Block until the asynchronous operation has completed.
do io_service_.run_one(); while (ec == boost::asio::error::would_block);
it spends most of it's time.
|| operator unspecified_bool_type() const // true if
error
|
{
| return m_val == 0 ? 0 :
unspecified_bool_true;
6.84 | 72e: test
%eax,%eax
| // Block until the asynchronous operation has
completed.
|
do
|
io_.run_one();
| while (ec == basio::error::would_block);
is there any better pattern to implement the udp reception with timer?
or do you think that I should not worry about the performance.
thanks,
-Apostolos
based on the example
http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/example/cpp03/timeouts/blocking_udp_client.cpp
I forked the pattern to my application, but by using the linux perf tool
<https://perf.wiki.kernel.org/index.php/Main_Page> I noticed that in the
loop
// Block until the asynchronous operation has completed.
do io_service_.run_one(); while (ec == boost::asio::error::would_block);
it spends most of it's time.
|| operator unspecified_bool_type() const // true if
error
|
{
| return m_val == 0 ? 0 :
unspecified_bool_true;
6.84 | 72e: test
%eax,%eax
| // Block until the asynchronous operation has
completed.
|
do
|
io_.run_one();
| while (ec == basio::error::would_block);
is there any better pattern to implement the udp reception with timer?
or do you think that I should not worry about the performance.
thanks,
-Apostolos