Modify

Ticket #3923 (closed Bugs: fixed)

Opened 4 years ago

Last modified 4 years ago

ASIO calls copy-constructor for handler object from another thread

Reported by: Dmitry Owned by: chris_kohlhoff
Milestone: Boost 1.43.0 Component: asio
Version: Boost 1.42.0 Severity: Problem
Keywords: Cc: msvc

Description

win_iocp_socket_service use select_reactor with OwnThread?=true for performing connect operations. While finish connect op, handler copy-constructed on the stack (reactor_op_queue::do_complete/do_destroy), but constructor invoked from another thread (internal thread of select_reactor). That means, that if our handler have specific copy-constructor (for example, we use intrusive_ptr for holding this in bind_t) we need to synchronize it with main thread (or use interlocked functions).

Attachments

Change History

comment:1 Changed 4 years ago by chris_kohlhoff

This should have been addressed by changes I recently checked into the SVN trunk. If possible, can you please test and report any problems.

comment:2 Changed 4 years ago by chris_kohlhoff

  • Status changed from new to closed
  • Resolution set to fixed

The changes have been merged to the release branch in changeset [60680].

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.