Opened 7 years ago

Closed 7 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:

Description

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 https://github.com/boostorg/thread/pull/58 )

Attachments (1)

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

Download all attachments as: .zip

Change History (4)

by Mike Crowe <mac@…>, 7 years ago

Patch to fix problem.

comment:2 by viboes, 7 years ago

Owner: changed from Anthony Williams to viboes
Status: newassigned

comment:3 by viboes, 7 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.