Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upOrdering guarantees for timers #7450
Conversation
highfive
commented
Aug 30, 2015
|
|
|
Just to avoid radio silence, I've started looking at this several times but have run out time to wrap my head around all the changes. It's pretty dense, unfortunately. I'm going to try using github's split diff view to see if that makes it any easier. |
|
Oh wow, those diffs are pretty worthless. Apparently github does not do |
|
For the record, I've been looking at this since last commenting, and I plan to complete my review this weekend. |
|
Thank you so much for doing this work @benschulz! This is really well put together, and I sincerely apologize for the long delay in reviewing it properly. Reviewed 19 of 19 files at r1. components/compositing/timer_scheduler.rs, line 49 [r1] (raw file): components/compositing/timer_scheduler.rs, line 52 [r1] (raw file): components/compositing/timer_scheduler.rs, line 102 [r1] (raw file): components/compositing/timer_scheduler.rs, line 125 [r1] (raw file): components/compositing/timer_scheduler.rs, line 151 [r1] (raw file): components/compositing/timer_scheduler.rs, line 205 [r1] (raw file): components/compositing/timer_scheduler.rs, line 218 [r1] (raw file): components/script/timers.rs, line 42 [r1] (raw file): components/script/timers.rs, line 94 [r1] (raw file): components/script/timers.rs, line 139 [r1] (raw file): components/script/timers.rs, line 151 [r1] (raw file): components/script/timers.rs, line 171 [r1] (raw file): components/script/timers.rs, line 188 [r1] (raw file): components/script/timers.rs, line 191 [r1] (raw file): components/script/timers.rs, line 253 [r1] (raw file): if let Some(timer) = timers.peek() {
}components/script/timers.rs, line 286 [r1] (raw file): components/script_traits/lib.rs, line 178 [r1] (raw file): Comments from the review on Reviewable.io |
|
Ha, no problem. I appreciate the amount of time it takes to review code. Especially when it's written by an unexperienced (Rust) developer. I also realize that these PRs are small things the core developers could do in a couple of minutes to hours. Of course, these delays do have a negative impact on motivation, but I don't think that should change anything. If anything I think your priorities are correct as they are. TL;DR: No need to apologize. Review status: all files reviewed at latest revision, 7 unresolved discussions, some commit checks failed. components/compositing/timer_scheduler.rs, line 52 [r1] (raw file):
components/compositing/timer_scheduler.rs, line 125 [r1] (raw file): components/script/timers.rs, line 139 [r1] (raw file): components/script/timers.rs, line 151 [r1] (raw file): components/script/timers.rs, line 171 [r1] (raw file): components/script_traits/lib.rs, line 178 [r1] (raw file): Comments from the review on Reviewable.io |
|
Review status: all files reviewed at latest revision, 6 unresolved discussions, some commit checks failed. components/compositing/timer_scheduler.rs, line 52 [r1] (raw file): components/compositing/timer_scheduler.rs, line 125 [r1] (raw file): components/script/timers.rs, line 0 [r1] (raw file): components/script_traits/lib.rs, line 0 [r1] (raw file): Comments from the review on Reviewable.io |
|
Review status: 15 of 19 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed. components/compositing/timer_scheduler.rs, line 52 [r1] (raw file): components/script/timers.rs, line 142 [r1] (raw file): components/script/timers.rs, line 154 [r1] (raw file): I'll stare at it some more on the weekend, hopefully I'll grok it then. Comments from the review on Reviewable.io |
|
Review status: 15 of 19 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed. components/compositing/timer_scheduler.rs, line 52 [r1] (raw file): components/script/timers.rs, line 0 [r1] (raw file): Comments from the review on Reviewable.io |
|
-S-awaiting-review +S-needs-code-changes Reviewed 4 of 4 files at r2. components/compositing/timer_scheduler.rs, line 123 [r2] (raw file): Comments from the review on Reviewable.io |
5ba0e0e
to
169df36
|
Review status: 10 of 19 files reviewed at latest revision, 3 unresolved discussions, some commit checks failed. components/script/timers.rs, line 142 [r1] (raw file): components/script_traits/lib.rs, line 214 [r11] (raw file): components/util/mem.rs, line 209 [r9] (raw file): Comments from the review on Reviewable.io |
|
Once again, apologies for the delay; I've been stretched really thin recently. I think we're very close to finishing this work, however! Reviewed 2 of 2 files at r3, 1 of 1 files at r4, 1 of 1 files at r5, 1 of 1 files at r6, 1 of 1 files at r7, 6 of 6 files at r8, 1 of 1 files at r9, 2 of 2 files at r10, 1 of 1 files at r11. components/script/timers.rs, line 221 [r11] (raw file): components/script/timers.rs, line 241 [r11] (raw file): components/script/timers.rs, line 299 [r11] (raw file): components/servo/Cargo.lock, line 1412 [r8] (raw file): components/util/mem.rs, line 209 [r9] (raw file): Comments from the review on Reviewable.io |
Premature celebration… that was tempting fate. :P Repeating timers could not clear themselves, because their |
|
@bors-servo: r+ Reviewed 1 of 1 files at r15, 20 of 20 files at r17. Comments from the review on Reviewable.io |
|
|
|
|
86063fe
to
553a0db
|
@bors-servo: r+ |
|
|
Ordering guarantees for timers This is an rough solution to the issue described in #3396. XHRs still do their own thing and an overall clean up is in order. Before I do that, though, I'd really like someone to sign off on the overall idea. There's one major difference to what jdm layed out #3396: The timers remain with the window/worker and only the earliest expiring one is coordinated with the dedicated timer thread. That means both the timer thread and the window/worker have to keep track of which timer expires next, which feels a bit wonky. However, the upshot is that there's no need for communication with the timer thread when a pipeline is frozen, thawed or dropped. Most relvant parts are - the [`TimerScheduler`](6f5f661#diff-74137a6f50ab38e7a1e4d16920a66ce7R73), which is the new per-constellation timer task and - the [`ActiveTimers`](6f5f661#diff-86707d952414a2860b78bcf6c1db8e2eR34) which is what's left on the window/worker side. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7450) <!-- Reviewable:end -->
|
|
|
@bors-servo: retry |
|
|
|
|
waddlesplash
commented
Oct 21, 2015
|
Woohoo! |
|
The changes in this pull request caused a regression: #8324 |
benschulz commentedAug 30, 2015
This is an rough solution to the issue described in #3396. XHRs still do their own thing and an overall clean up is in order. Before I do that, though, I'd really like someone to sign off on the overall idea.
There's one major difference to what jdm layed out #3396: The timers remain with the window/worker and only the earliest expiring one is coordinated with the dedicated timer thread.
That means both the timer thread and the window/worker have to keep track of which timer expires next, which feels a bit wonky. However, the upshot is that there's no need for communication with the timer thread when a pipeline is frozen, thawed or dropped.
Most relvant parts are
TimerScheduler, which is the new per-constellation timer task andActiveTimerswhich is what's left on the window/worker side.