MCPcopy Create free account
hub / github.com/endbasic/endbasic / yield_now

Method yield_now

web/src/lib.rs:182–194  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

180#[async_trait(?Send)]
181impl Yielder for WebYielder {
182 async fn yield_now(&mut self) {
183 match self.take_yield_decision(current_time_millis()) {
184 YieldDecision::Continue => (),
185 YieldDecision::Fairness => {
186 do_message_channel_yield().await;
187 self.on_host_yield();
188 }
189 YieldDecision::Paint => {
190 do_request_animation_frame().await;
191 self.on_host_yield();
192 }
193 }
194 }
195}
196
197/// Sets up the common storage drives.

Callers

nothing calls this directly

Calls 5

current_time_millisFunction · 0.85
do_message_channel_yieldFunction · 0.85
take_yield_decisionMethod · 0.80
on_host_yieldMethod · 0.80

Tested by

no test coverage detected