Made some tutorial documentation fixes.
This commit is contained in:
parent
eb2ef761a6
commit
61442935bd
@ -43,8 +43,8 @@ seconds from now.
|
|||||||
\until asio::timer
|
\until asio::timer
|
||||||
|
|
||||||
<b>Step 4.</b> In this simple example we perform a blocking wait on the timer.
|
<b>Step 4.</b> In this simple example we perform a blocking wait on the timer.
|
||||||
That is, the call to wait() will not return until the timer has expired, 5
|
That is, the call to asio::timer::wait() will not return until the timer has
|
||||||
seconds after it was created.
|
expired, 5 seconds after it was created.
|
||||||
|
|
||||||
\until wait
|
\until wait
|
||||||
|
|
||||||
@ -83,12 +83,11 @@ asynchronous wait finishes.
|
|||||||
|
|
||||||
\until asio::timer
|
\until asio::timer
|
||||||
|
|
||||||
<b>Step 2.</b> Next, instead of doing a blocking wait as in Part 1, we
|
<b>Step 2.</b> Next, instead of doing a blocking wait as in Part 1, we call
|
||||||
call the <tt>async_wait</tt> function to perform an asynchronous wait. When
|
the asio::timer::async_wait() function to perform an asynchronous wait. When
|
||||||
calling this function we pass the <tt>print</tt> callback handler that was
|
calling this function we pass the <tt>print</tt> callback handler that was
|
||||||
defined above.
|
defined above.
|
||||||
|
|
||||||
|
|
||||||
\skipline async_wait
|
\skipline async_wait
|
||||||
|
|
||||||
<b>Step 3.</b> Finally, we must call the asio::demuxer::run() member function
|
<b>Step 3.</b> Finally, we must call the asio::demuxer::run() member function
|
||||||
@ -155,8 +154,8 @@ more "work" to do. By not starting a new asynchronous wait on the timer when
|
|||||||
|
|
||||||
<b>Step 3.</b> Next we move the expiry time for the timer along by one second
|
<b>Step 3.</b> Next we move the expiry time for the timer along by one second
|
||||||
from the previous expiry time. Using the asio::timer::from_existing flag
|
from the previous expiry time. Using the asio::timer::from_existing flag
|
||||||
instead of asio::timer::from_now ensures that the timer does drift away from
|
instead of asio::timer::from_now ensures that the timer does not drift away
|
||||||
the whole-second mark due to any delays in processing the handler.
|
from the whole-second mark due to any delays in processing the handler.
|
||||||
|
|
||||||
\until set
|
\until set
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user