summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-05-06 17:44:27 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-05-06 17:44:27 (GMT)
commitd76ada0ab59634e3333f9eb5a92d0e850f60d7bf (patch)
tree5eaae441173fad2ec19ba67d6589f28ecd740991 /3rdParty/Boost/src/boost/asio/io_service.hpp
parent6f49e5abee37d37b351d68c01374232eccdac458 (diff)
downloadswift-contrib-d76ada0ab59634e3333f9eb5a92d0e850f60d7bf.zip
swift-contrib-d76ada0ab59634e3333f9eb5a92d0e850f60d7bf.tar.bz2
Updated Boost to 1.43.0.
Diffstat (limited to '3rdParty/Boost/src/boost/asio/io_service.hpp')
-rw-r--r--3rdParty/Boost/src/boost/asio/io_service.hpp47
1 files changed, 31 insertions, 16 deletions
diff --git a/3rdParty/Boost/src/boost/asio/io_service.hpp b/3rdParty/Boost/src/boost/asio/io_service.hpp
index a34d874..3863e96 100644
--- a/3rdParty/Boost/src/boost/asio/io_service.hpp
+++ b/3rdParty/Boost/src/boost/asio/io_service.hpp
@@ -26,11 +26,8 @@
#include <boost/system/error_code.hpp>
#include <boost/asio/detail/pop_options.hpp>
-#include <boost/asio/detail/dev_poll_reactor_fwd.hpp>
-#include <boost/asio/detail/epoll_reactor_fwd.hpp>
-#include <boost/asio/detail/kqueue_reactor_fwd.hpp>
#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/select_reactor_fwd.hpp>
+#include <boost/asio/detail/reactor_fwd.hpp>
#include <boost/asio/detail/service_registry_fwd.hpp>
#include <boost/asio/detail/signal_init.hpp>
#include <boost/asio/detail/task_io_service_fwd.hpp>
@@ -46,6 +43,12 @@ template <typename Service> Service& use_service(io_service& ios);
template <typename Service> void add_service(io_service& ios, Service* svc);
template <typename Service> bool has_service(io_service& ios);
+#if defined(BOOST_ASIO_HAS_IOCP)
+namespace detail { typedef win_iocp_io_service io_service_impl; }
+#else
+namespace detail { typedef task_io_service<reactor> io_service_impl; }
+#endif
+
/// Provides core I/O functionality.
/**
* The io_service class provides the core I/O functionality for users of the
@@ -178,18 +181,9 @@ class io_service
: private noncopyable
{
private:
- // The type of the platform-specific implementation.
+ typedef detail::io_service_impl impl_type;
#if defined(BOOST_ASIO_HAS_IOCP)
- typedef detail::win_iocp_io_service impl_type;
friend class detail::win_iocp_overlapped_ptr;
-#elif defined(BOOST_ASIO_HAS_EPOLL)
- typedef detail::task_io_service<detail::epoll_reactor<false> > impl_type;
-#elif defined(BOOST_ASIO_HAS_KQUEUE)
- typedef detail::task_io_service<detail::kqueue_reactor<false> > impl_type;
-#elif defined(BOOST_ASIO_HAS_DEV_POLL)
- typedef detail::task_io_service<detail::dev_poll_reactor<false> > impl_type;
-#else
- typedef detail::task_io_service<detail::select_reactor<false> > impl_type;
#endif
public:
@@ -406,6 +400,14 @@ public:
* @param handler The handler to be called. The io_service will make
* a copy of the handler object as required. The function signature of the
* handler must be: @code void handler(); @endcode
+ *
+ * @note This function throws an exception only if:
+ *
+ * @li the handler's @c asio_handler_allocate function; or
+ *
+ * @li the handler's copy constructor
+ *
+ * throws an exception.
*/
template <typename CompletionHandler>
void dispatch(CompletionHandler handler);
@@ -423,6 +425,14 @@ public:
* @param handler The handler to be called. The io_service will make
* a copy of the handler object as required. The function signature of the
* handler must be: @code void handler(); @endcode
+ *
+ * @note This function throws an exception only if:
+ *
+ * @li the handler's @c asio_handler_allocate function; or
+ *
+ * @li the handler's copy constructor
+ *
+ * throws an exception.
*/
template <typename CompletionHandler>
void post(CompletionHandler handler);
@@ -606,9 +616,14 @@ private:
virtual void shutdown_service() = 0;
friend class boost::asio::detail::service_registry;
+ struct key
+ {
+ key() : type_info_(0), id_(0) {}
+ const std::type_info* type_info_;
+ const boost::asio::io_service::id* id_;
+ } key_;
+
boost::asio::io_service& owner_;
- const std::type_info* type_info_;
- const boost::asio::io_service::id* id_;
service* next_;
};