update timer scheduler to use crossbeam

This commit is contained in:
Gregory Terzian 2019-10-18 23:37:31 +08:00
parent 32eb858a6a
commit c893c8955d
4 changed files with 73 additions and 107 deletions

View file

@ -556,14 +556,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