pub struct ProviderSynchronousProxy { /* private fields */ }
Implementations§
source§impl ProviderSynchronousProxy
impl ProviderSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ProviderEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ProviderEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
sourcepub fn register_watcher(
&self,
watcher: ClientEnd<WatcherMarker>,
) -> Result<(), Error>
pub fn register_watcher( &self, watcher: ClientEnd<WatcherMarker>, ) -> Result<(), Error>
Used to register for memory pressure level changes.
watcher
: memory pressure Watcher
channel that the Provider
will use to send
level change messages to the client.
The current memory pressure level is immediately sent to the watcher when this method is called.
It is recommended that the root job in a component tree register for changes, rather than having individual jobs further down the tree register individually. A low client count will help minimize system churn due to a large number of memory pressure messages in transit at the same time. Also, the more context a job has, the better equipped it will be to react to memory pressure by controlling the behavior of children jobs in its tree.
Trait Implementations§
source§impl Debug for ProviderSynchronousProxy
impl Debug for ProviderSynchronousProxy
source§impl SynchronousProxy for ProviderSynchronousProxy
impl SynchronousProxy for ProviderSynchronousProxy
§type Proxy = ProviderProxy
type Proxy = ProviderProxy
§type Protocol = ProviderMarker
type Protocol = ProviderMarker
Proxy
controls.