Set alarm in std executor

This commit is contained in:
Dario Nieuwenhuis 2021-02-03 05:01:30 +01:00
parent d71c4b4551
commit cbea07716b

View File

@ -116,6 +116,7 @@ impl Executor {
/// This function never returns. /// This function never returns.
pub fn run(&'static mut self, init: impl FnOnce(Spawner)) -> ! { pub fn run(&'static mut self, init: impl FnOnce(Spawner)) -> ! {
self.inner.set_signal_ctx(&self.signaler as *const _ as _); self.inner.set_signal_ctx(&self.signaler as *const _ as _);
self.inner.set_alarm(&StdAlarm);
init(unsafe { self.inner.spawner() }); init(unsafe { self.inner.spawner() });