Update of /cvsroot/boost/boost/boost/asio
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13926/boost/asio
Modified Files:
basic_deadline_timer.hpp io_service.hpp
Log Message:
Documentation updates.
Index: basic_deadline_timer.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/asio/basic_deadline_timer.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- basic_deadline_timer.hpp 8 Jan 2007 03:01:13 -0000 1.5
+++ basic_deadline_timer.hpp 20 May 2007 00:30:54 -0000 1.6
@@ -41,8 +41,6 @@
* @e Distinct @e objects: [EMAIL PROTECTED]
* @e Shared @e objects: Unsafe.
*
- * @sa @ref deadline_timer_reset
- *
* @par Examples
* Performing a blocking wait:
* @code
@@ -76,6 +74,45 @@
* // Start an asynchronous wait.
* timer.async_wait(handler);
* @endcode
+ *
+ * @par Changing an active deadline_timer's expiry time
+ *
+ * Changing the expiry time of a timer while there are pending asynchronous
+ * waits causes those wait operations to be cancelled. To ensure that the
action
+ * associated with the timer is performed only once, use something like this:
+ * used:
+ *
+ * @code
+ * void on_some_event()
+ * {
+ * if (my_timer.expires_from_now(seconds(5)) > 0)
+ * {
+ * // We managed to cancel the timer. Start new asynchronous wait.
+ * my_timer.async_wait(on_timeout);
+ * }
+ * else
+ * {
+ * // Too late, timer has already expired!
+ * }
+ * }
+ *
+ * void on_timeout(const boost::system::error_code& e)
+ * {
+ * if (e != boost::asio::error::operation_aborted)
+ * {
+ * // Timer was not cancelled, take necessary action.
+ * }
+ * }
+ * @endcode
+ *
+ * @li The boost::asio::basic_deadline_timer::expires_from_now() function
+ * cancels any pending asynchronous waits, and returns the number of
+ * asynchronous waits that were cancelled. If it returns 0 then you were too
+ * late and the wait handler has already been executed, or will soon be
+ * executed. If it returns 1 then the wait handler was successfully cancelled.
+ *
+ * @li If a wait handler is cancelled, the boost::system::error_code passed to
+ * it contains the value boost::asio::error::operation_aborted.
*/
template <typename Time,
typename TimeTraits = boost::asio::time_traits<Time>,
@@ -198,9 +235,6 @@
* operations will be cancelled. The handler for each cancelled operation
will
* be invoked with the boost::asio::error::operation_aborted error code.
*
- * See @ref deadline_timer_reset for more information on altering the expiry
- * time of an active timer.
- *
* @param expiry_time The expiry time to be used for the timer.
*
* @return The number of asynchronous operations that were cancelled.
@@ -222,9 +256,6 @@
* operations will be cancelled. The handler for each cancelled operation
will
* be invoked with the boost::asio::error::operation_aborted error code.
*
- * See @ref deadline_timer_reset for more information on altering the expiry
- * time of an active timer.
- *
* @param expiry_time The expiry time to be used for the timer.
*
* @param ec Set to indicate what error occurred, if any.
@@ -253,9 +284,6 @@
* operations will be cancelled. The handler for each cancelled operation
will
* be invoked with the boost::asio::error::operation_aborted error code.
*
- * See @ref deadline_timer_reset for more information on altering the expiry
- * time of an active timer.
- *
* @param expiry_time The expiry time to be used for the timer.
*
* @return The number of asynchronous operations that were cancelled.
@@ -277,9 +305,6 @@
* operations will be cancelled. The handler for each cancelled operation
will
* be invoked with the boost::asio::error::operation_aborted error code.
*
- * See @ref deadline_timer_reset for more information on altering the expiry
- * time of an active timer.
- *
* @param expiry_time The expiry time to be used for the timer.
*
* @param ec Set to indicate what error occurred, if any.
@@ -350,49 +375,6 @@
}
};
-/**
- * @page deadline_timer_reset Changing an active deadline_timer's expiry time
- *
- * Changing the expiry time of a timer while there are pending asynchronous
- * waits causes those wait operations to be cancelled. To ensure that the
action
- * associated with the timer is performed only once, use something like this:
- * used:
- *
- * @code
- * void on_some_event()
- * {
- * if (my_timer.expires_from_now(seconds(5)) > 0)
- * {
- * // We managed to cancel the timer. Start new asynchronous wait.
- * my_timer.async_wait(on_timeout);
- * }
- * else
- * {
- * // Too late, timer has already expired!
- * }
- * }
- *
- * void on_timeout(const boost::system::error_code& e)
- * {
- * if (e != boost::asio::error::operation_aborted)
- * {
- * // Timer was not cancelled, take necessary action.
- * }
- * }
- * @endcode
- *
- * @li The boost::asio::basic_deadline_timer::expires_from_now() function
- * cancels any pending asynchronous waits, and returns the number of
- * asynchronous waits that were cancelled. If it returns 0 then you were too
- * late and the wait handler has already been executed, or will soon be
- * executed. If it returns 1 then the wait handler was successfully cancelled.
- *
- * @li If a wait handler is cancelled, the boost::system::error_code passed to
- * it contains the value boost::asio::error::operation_aborted.
- *
- * @sa boost::asio::basic_deadline_timer
- */
-
} // namespace asio
} // namespace boost
Index: io_service.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/asio/io_service.hpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- io_service.hpp 6 May 2007 22:36:18 -0000 1.10
+++ io_service.hpp 20 May 2007 00:30:54 -0000 1.11
@@ -61,7 +61,40 @@
* @par Concepts:
* Dispatcher.
*
- * @sa @ref io_service_handler_exception
+ * @par Effect of exceptions thrown from handlers
+ *
+ * If an exception is thrown from a handler, the exception is allowed to
+ * propagate through the throwing thread's invocation of
+ * boost::asio::io_service::run(), boost::asio::io_service::run_one(),
+ * boost::asio::io_service::poll() or boost::asio::io_service::poll_one().
+ * No other threads that are calling any of these functions are affected. It is
+ * then the responsibility of the application to catch the exception.
+ *
+ * After the exception has been caught, the
+ * boost::asio::io_service::run(), boost::asio::io_service::run_one(),
+ * boost::asio::io_service::poll() or boost::asio::io_service::poll_one()
+ * call may be restarted @em without the need for an intervening call to
+ * boost::asio::io_service::reset(). This allows the thread to rejoin the
+ * io_service's thread pool without impacting any other threads in the pool.
+ *
+ * For example:
+ *
+ * @code
+ * boost::asio::io_service io_service;
+ * ...
+ * for (;;)
+ * {
+ * try
+ * {
+ * io_service.run();
+ * break; // run() exited normally
+ * }
+ * catch (my_exception& e)
+ * {
+ * // Deal with exception as appropriate.
+ * }
+ * }
+ * @endcode
*/
class io_service
: private noncopyable
@@ -461,42 +494,6 @@
}
};
-/**
- * @page io_service_handler_exception Effect of exceptions thrown from handlers
- *
- * If an exception is thrown from a handler, the exception is allowed to
- * propagate through the throwing thread's invocation of
- * boost::asio::io_service::run(), boost::asio::io_service::run_one(),
- * boost::asio::io_service::poll() or boost::asio::io_service::poll_one().
- * No other threads that are calling any of these functions are affected. It is
- * then the responsibility of the application to catch the exception.
- *
- * After the exception has been caught, the
- * boost::asio::io_service::run(), boost::asio::io_service::run_one(),
- * boost::asio::io_service::poll() or boost::asio::io_service::poll_one()
- * call may be restarted @em without the need for an intervening call to
- * boost::asio::io_service::reset(). This allows the thread to rejoin the
- * io_service's thread pool without impacting any other threads in the pool.
- *
- * @par Example
- * @code
- * boost::asio::io_service io_service;
- * ...
- * for (;;)
- * {
- * try
- * {
- * io_service.run();
- * break; // run() exited normally
- * }
- * catch (my_exception& e)
- * {
- * // Deal with exception as appropriate.
- * }
- * }
- * @endcode
- */
-
} // namespace asio
} // namespace boost
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs