Opened 2 years ago

Closed 2 years ago

#11688 closed Bugs (fixed)

thread::try_join_until: Avoid busy wait if system clock changes

Reported by: Mike Crowe <mac@…> Owned by: viboes
Milestone: Boost 1.60.0 Component: thread
Version: Boost 1.58.0 Severity: Problem
Keywords: Cc:


If system clock changes by an amount larger than the outstanding duration according to the supplied clock then the code loops around again but continues to pass a time point based on the original value of the system clock to the system_clock variant of try_join.

If we're going to recalculate the outstanding duration in the loop then it is necessary to get the current time according to the system clock to use with this duration.

(Originally raised as )

Attachments (1)

0001-thread-try_join_until-Avoid-busy-wait-if-system-cloc.patch (1.6 KB) - added by Mike Crowe <mac@…> 2 years ago.
Patch to fix problem.

Download all attachments as: .zip

Change History (4)

Changed 2 years ago by Mike Crowe <mac@…>

Patch to fix problem.

comment:2 Changed 2 years ago by viboes

Owner: changed from Anthony Williams to viboes
Status: newassigned

comment:3 Changed 2 years ago by viboes

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain viboes.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.