scheduler: Workaround negative nsecs bug in boost’s wait_until #18271

pull luke-jr wants to merge 1 commits into bitcoin:master from luke-jr:wrkarnd_boost_wait_until changing 1 files +14 −2
  1. luke-jr commented at 10:43 pm on March 5, 2020: member

    Some boost versions have a bug that can cause a time prior to system boot (or wake from sleep) to throw an exception instead of return timeout See https://github.com/boostorg/thread/issues/308

    Fixes #18227

    Cleanly merges to 0.14+

  2. DrahtBot commented at 1:42 am on March 6, 2020: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    No conflicts as of last run.

  3. ajtowns commented at 2:46 am on March 6, 2020: member
    I think travis is failing because this catches boost::thread_interrupted and sometimes doesn’t rethrow it. Checking timeToWaitFor <= ::now() prior to calling wait_until might work better?
  4. scheduler: Workaround negative nsecs bug in boost's wait_until
    Some boost versions have a bug that can cause a time prior to system boot (or wake from sleep) to throw an exception instead of return timeout
    See https://github.com/boostorg/thread/issues/308
    ed0223ec59
  5. luke-jr force-pushed on Mar 6, 2020
  6. luke-jr commented at 3:55 am on March 6, 2020: member

    That could break in a race (suspend after check, but before wait_until).

    Fixed it by always rethrowing boost::thread_interrupted reliably.

  7. MarcoFalke commented at 7:47 pm on March 6, 2020: member
    Please enable the mockscheduler unit test again
  8. luke-jr closed this on Mar 6, 2020

  9. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 09:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me