MCPcopy Create free account
hub / github.com/chyyuu/os_kernel_lab / run

Method run

user/src/bin/stackless_coroutine.rs:77–89  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

75 }
76
77 fn run(&mut self) {
78 let waker = create_waker();
79 let mut context = Context::from_waker(&waker);
80
81 while let Some(mut task) = self.tasks.pop_front() {
82 match task.as_mut().poll(&mut context) {
83 Poll::Pending => {
84 self.tasks.push_back(task);
85 }
86 Poll::Ready(()) => {}
87 }
88 }
89 }
90}
91
92pub fn create_waker() -> Waker {

Callers 1

mainFunction · 0.45

Calls 2

create_wakerFunction · 0.85
pollMethod · 0.80

Tested by

no test coverage detected