Smithay / calloop

A callback-based Event Loop
MIT License
177 stars 34 forks source link

executor: Fix issue when task is scheduled within event callback #172

Closed ids1024 closed 5 months ago

ids1024 commented 5 months ago

I believe this should be overall more correct. Previously, if the callback taken by process_events scheduled a task, process_events could exit with the readiness of self.ping cleared, but notified set to true. In which case, future calls to schedule would not wake the event source.

Fixes https://github.com/Smithay/calloop/issues/171.

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (cd9c3f3) 86.30% compared to head (0b79bee) 86.26%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #172 +/- ## ========================================== - Coverage 86.30% 86.26% -0.04% ========================================== Files 16 16 Lines 2044 2039 -5 ========================================== - Hits 1764 1759 -5 Misses 280 280 ``` | [Flag](https://app.codecov.io/gh/Smithay/calloop/pull/172/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Smithay) | Coverage Δ | | |---|---|---| | [macos-latest](https://app.codecov.io/gh/Smithay/calloop/pull/172/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Smithay) | `85.38% <100.00%> (-0.01%)` | :arrow_down: | | [ubuntu-latest](https://app.codecov.io/gh/Smithay/calloop/pull/172/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Smithay) | `85.85% <100.00%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Smithay#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.