Skip to content

Correct Timeout rescheduling #12941

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2020
Merged

Conversation

kjbracey
Copy link
Contributor

@kjbracey kjbracey commented May 7, 2020

Summary of changes

Chrono changes "optimised" Timeout::handler in a way that broke users who rescheduled the timeout during their attached callback.

Attempted optimisation is less necessary now that platform.callback-nontrivial is set to false by default - that setting reduces overhead of copying the Callback to almost nothing.

Fixes #12940.

Impact of changes

Migration actions required

Documentation

None


Pull request type

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[X] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Except that test is not currently being run in CI. I'll look at adding a similar test that is stable enough to run that would show this issue.


Reviewers

@jeromecoutant


Chrono changes "optimised" `Timeout::handler` in a way that broke users
who rescheduled the timeout during their attached callback.

Attempted optimisation is less necessary now that
`platform.callback-nontrivial` is set to false by default - that
setting reduces overhead of copying the `Callback` to almost nothing.
@0xc0170
Copy link
Contributor

0xc0170 commented May 7, 2020

CI started

@mergify mergify bot added needs: CI and removed needs: review labels May 7, 2020
@mbed-ci
Copy link

mbed-ci commented May 7, 2020

Test run: FAILED

Summary: 1 of 6 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@0xc0170
Copy link
Contributor

0xc0170 commented May 7, 2020

io serial error, restarted

@0xc0170
Copy link
Contributor

0xc0170 commented May 7, 2020

Thanks @kjbracey-arm !

@kjbracey kjbracey deleted the chrono-timeout-fix branch May 8, 2020 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timing drift test failing for multiple targets
4 participants