MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / push_future

Method push_future

crates/wasmtime/src/runtime/component/concurrent.rs:5223–5231  ·  view source on GitHub ↗
(&mut self, future: HostTaskFuture)

Source from the content-addressed store, hash-verified

5221 }
5222
5223 fn push_future(&mut self, future: HostTaskFuture) {
5224 // Note that we can't directly push to `ConcurrentState::futures` here
5225 // since this may be called from a future that's being polled inside
5226 // `Self::poll_until`, which temporarily removes the `FuturesUnordered`
5227 // so it has exclusive access while polling it. Therefore, we push a
5228 // work item to the "high priority" queue, which will actually push to
5229 // `ConcurrentState::futures` later.
5230 self.push_high_priority(WorkItem::PushFuture(AlwaysMut::new(future)));
5231 }
5232
5233 fn push_high_priority(&mut self, item: WorkItem) {
5234 log::trace!("push high priority: {item:?}");

Callers 6

poll_and_blockFunction · 0.80
spawn_with_accessorMethod · 0.80
first_pollMethod · 0.80
pipe_from_guestMethod · 0.80
pipe_to_guestMethod · 0.80
set_consumerMethod · 0.80

Calls 2

push_high_priorityMethod · 0.80
newFunction · 0.50

Tested by

no test coverage detected