Modify

Ticket #6269 (closed Feature Requests: fixed)

Opened 2 years ago

Last modified 2 years ago

c++11 compliance: thread move assignment should call terminate if joinable

Reported by: viboes Owned by: viboes
Milestone: Boost 1.50.0 Component: thread
Version: Boost 1.48.0 Severity: Problem
Keywords: Cc:

Description

In order to be standard compliant the thread move assignment should call terminate if joinable instead of detaching the thread.

"30.3.1.4 thread assignment [thread.thread.assign]

thread& operator=(thread&& x) noexcept;

Effects: If joinable(), calls terminate(). Otherwise, assigns the state of x to *this and sets x to a default constructed state."

This behavior is incompatible with the current version, so it shall be activated by a specific define, i.e., BOOST_THREAD_VERSION=2.

Attachments

Change History

comment:1 Changed 2 years ago by viboes

  • Summary changed from c++11 complicance: thread move assignment should call terminate if joinable to c++11 compliance: thread move assignment should call terminate if joinable

comment:2 Changed 2 years ago by viboes

  • Owner changed from anthonyw to viboes
  • Status changed from new to assigned

comment:3 Changed 2 years ago by viboes

  • Milestone changed from To Be Determined to Boost 1.50.0

See the patch in #6266.

Committed revision [77718].

comment:4 Changed 2 years ago by viboes

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

Committed in release branch at [78543]

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.