mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #24492 - gterzian:update_timer_scheduler, r=asajeffrey
Update timer scheduler to use crossbeam <!-- Please describe your changes on the following line: --> It seems time to update the timer scheduler implementation to use crossbeam constructs. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
commit
61dc04a293
4 changed files with 73 additions and 107 deletions
|
@ -561,14 +561,9 @@ pub struct TimerEventRequest(
|
|||
pub MsDuration,
|
||||
);
|
||||
|
||||
/// Type of messages that can be sent to the timer scheduler.
|
||||
/// The message used to send a request to the timer scheduler.
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub enum TimerSchedulerMsg {
|
||||
/// Message to schedule a new timer event.
|
||||
Request(TimerEventRequest),
|
||||
/// Message to exit the timer scheduler.
|
||||
Exit,
|
||||
}
|
||||
pub struct TimerSchedulerMsg(pub TimerEventRequest);
|
||||
|
||||
/// Notifies the script thread to fire due timers.
|
||||
/// `TimerSource` must be `FromWindow` when dispatched to `ScriptThread` and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue