MCPcopy Create free account
hub / github.com/Logicalshift/flo_draw / run_process

Method run_process

draw/src/glutin_runtime.rs:345–357  ·  view source on GitHub ↗

Runs a process in the context of this runtime

(&mut self, future: Fut)

Source from the content-addressed store, hash-verified

343 /// Runs a process in the context of this runtime
344 ///
345 fn run_process<Fut: 'static+Future<Output=()>>(&mut self, future: Fut) {
346 // Box the future for polling
347 let future = future.boxed_local();
348
349 // Assign an ID to this future (we use this for waking it up)
350 let future_id = NEXT_FUTURE_ID.fetch_add(1, Ordering::Relaxed);
351
352 // Store in the runtime
353 self.futures.insert(future_id, future);
354
355 // Perform the initial polling operation on the future
356 self.poll_future(future_id);
357 }
358
359 ///
360 /// Causes the future with the specified ID to be polled

Callers 3

handle_window_eventMethod · 0.80
request_redrawMethod · 0.80
handle_thread_eventMethod · 0.80

Calls 1

poll_futureMethod · 0.80

Tested by

no test coverage detected