Repository navigation
[DO NOT MERGE] constellation: Simplify the scheduler so it doesn't create a thread for each event - #11272
[DO NOT MERGE] constellation: Simplify the scheduler so it doesn't create a thread for each event#11272emilio wants to merge 1 commit into
Conversation
…read for each event This can't land as-is, just wanted to make sure this idea is fine, and do a try run because I need to leave now.
|
Heads up! This PR modifies the following files:
|
|
Note that this can't land as-is since the @bors-servo: try |
[DO NOT MERGE] constellation: Simplify the scheduler so it doesn't create a thread for each event Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy --faster` does not report any errors - [x] These changes fix #11268 (github issue number if applicable). Either: - [x] These changes do not require tests because this is a refactoring Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --- This can't land as-is, just wanted to make sure this idea is fine, and do a try run because I need to leave now. r? @asajeffrey <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11272) <!-- Reviewable:end -->
| } | ||
| } | ||
|
|
||
| fn recv_with_timeout<T: Send>(port: &Receiver<T>, from: NsDuration, timeout: NsDuration) -> Option<T> { |
There was a problem hiding this comment.
Taking from as an argument seems a little odd.
There was a problem hiding this comment.
Agreed, it was to avoid another precise_time_ns call. I'll see how I can refactor it so it's cleaner :)
|
@bors-servo: try- |
| return Some(Task::DispatchDueEvents); | ||
| } | ||
|
|
||
| let timeout = now - event.for_time; |
There was a problem hiding this comment.
This is wrong, and should be the inverse, I'll fix it when I'm in front of a computer
|
This is a huge improvement on readability as well as solving the problem you identified. Great work. How are you planning to fix recv_with_timeout? @pcwalton will probably want to have a quick look at this. |
|
@bors-servo r- Homu is confused. |
|
@bors-servo r- clean force try- |
|
@bors-servo r+ clean force Trying things... |
|
📌 Commit 28f0b09 has been approved by |
|
@bors-servo r- force |
|
Closing this, Homu broken. |
Thank you for contributing to Servo! Please replace each
[ ]by[X]when the step is complete, and replace__with appropriate data:./mach build -ddoes not report any errors./mach test-tidy --fasterdoes not report any errorsEither:
Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.
This can't land as-is, just wanted to make sure this idea is fine, and do a try
run because I need to leave now.
r? @asajeffrey
This change is