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

Method poll

user/src/bin/stackless_coroutine.rs:41–52  ·  view source on GitHub ↗
(mut self: Pin<&mut Self>, _cx: &mut Context)

Source from the content-addressed store, hash-verified

39 type Output = ();
40
41 fn poll(mut self: Pin<&mut Self>, _cx: &mut Context) -> Poll<Self::Output> {
42 match self.task.state {
43 State::Halted => {
44 self.task.state = State::Running;
45 Poll::Ready(())
46 }
47 State::Running => {
48 self.task.state = State::Halted;
49 Poll::Pending
50 }
51 }
52 }
53}
54
55struct Executor {

Callers 1

runMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected