Fix due-now timeout jobs in executor and CLI#4785
Fix due-now timeout jobs in executor and CLI#4785Nakshatra480 wants to merge 13 commits intoboa-dev:mainfrom
Conversation
…s, and align CLI/examples across executors with corrected scheduling semantics logic
Test262 conformance changes
Tested main commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4785 +/- ##
==========================================
+ Coverage 47.24% 57.05% +9.81%
==========================================
Files 476 555 +79
Lines 46892 60613 +13721
==========================================
+ Hits 22154 34585 +12431
- Misses 24738 26028 +1290 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hey @jedel1043 @nekevss could you please take a look and review?
|
Apply the same split_off(&now) fix to smol_event_loop.rs and tokio_event_loop.rs so that timeout jobs scheduled at exactly are drained instead of being kept as future jobs.
82b6232 to
a974570
Compare
Ah, that makes sense! I was briefly confused when I saw that result. Thanks for the heads up and clarifying how the main branch conformance reporting works. |
|
Hi @jedel1043 i have fixed the due-now timeout jobs. Can you pls review this PR. |
|
I'd like to see a test for this PR. Do you think you could make one real quick? |
1a10d8d to
fa0c2d6
Compare
fa0c2d6 to
cc8ab1f
Compare
|
Hey @hansl the due-now timeout jobs are fixed and also added a test for this as per your feedback. Can you review this PR now? |
After seeing the [avalanche](#4886) [of](#4833) [issues](#4785) [that](#4749) [our](#4782) executors have, I don't think it's worth being too smart about when to exit the loop. Folks who wanna have that behaviour can just implement their own `JobExecutor`. Thus, this reverts the implementation to the old behaviour of blocking when having pending timeout and interval jobs. Fortunately, `run_jobs_async` exists, so we can use it in our CLI to intersperse executing jobs with executing parsing and execution. And just for good measure, it also adds a `stop` cancellation token to `SimpleJobExecutor`, in case folks still want to use it but that also want to remotely stop the event loop's execution from another thread.
|
Superseeded by #4891 |
Sorry for wasting your time😭 |
Closes #4782
Summary
Fixes timeout jobs scheduled at the current instant so
setTimeout(0)does not get skipped. Ensures due-now jobs are drained and pending checks treat equality as due.Changes
nowinstead of treating them as future.Tests