Skip to content
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

Closure c shutdown #5168

Merged
merged 1 commit into from
Jan 31, 2024
Merged

Closure c shutdown #5168

merged 1 commit into from
Jan 31, 2024

Commits on Jan 30, 2024

  1. Call device lost callback when it is replaced, or when the global is …

    …dropped.
    
    This fixes two cases where a DeviceLostClosureC might not be consumed
    before it is dropped, which is a requirement:
    
    1) When the closure is replaced, this ensures the to-be-dropped closure
    is invoked.
    2)  When the global is dropped, this ensures that the closure is invoked
    before it is dropped.
    
    The first of these two cases is tested in a new test,
    DEVICE_LOST_REPLACED_CALLBACK. The second case has a stub,
    always-skipped test, DROPPED_GLOBAL_THEN_DEVICE_LOST. The test is
    always-skipped because there does not appear to be a way to drop the
    global from within a test. Nor is there any other way to reach
    Device.prepare_to_die without having first dropping the device.
    bradwerth committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    d54a101 View commit details
    Browse the repository at this point in the history