Set alarm in std executor
This commit is contained in:
parent
d71c4b4551
commit
cbea07716b
@ -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() });
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user