Subject: [Boost-bugs] [Boost C++ Libraries] #8885: boost asio epoll reactor method "set_ready_events" not protected by lock
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-23 09:59:10
#8885: boost asio epoll reactor method "set_ready_events" not protected by lock
------------------------------+-------------------------------------
Reporter: carsten.becker@⦠| Type: Bugs
Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.54.0
Severity: Problem | Keywords: boost asio multi-thread
------------------------------+-------------------------------------
Suggested patch:
Index: boost/asio/detail/epoll_reactor.hpp
===================================================================
--- boost/asio/detail/epoll_reactor.hpp (Revision 85130)
+++ boost/asio/detail/epoll_reactor.hpp (Arbeitskopie)
@@ -64,7 +64,12 @@
bool shutdown_;
BOOST_ASIO_DECL descriptor_state();
- void set_ready_events(uint32_t events) { task_result_ = events; }
+
+ void set_ready_events(uint32_t events) {
+ mutex::scoped_lock lock(mutex_);
+ task_result_ = events;
+ }
+
BOOST_ASIO_DECL operation* perform_io(uint32_t events);
BOOST_ASIO_DECL static void do_complete(
io_service_impl* owner, operation* base,
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8885> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC