pub enum PollStrategy {
Spin,
Yield,
BackoffMicros(u64),
}Expand description
Strategy for polling GPU event completion.
Controls the trade-off between CPU usage and latency when waiting for a kernel to finish.
Variants§
Spin
Busy-poll event.query() with no pause between polls.
Lowest latency but highest CPU usage.
Yield
Call std::thread::yield_now() between polls.
Allows other threads to run but still polls frequently.
BackoffMicros(u64)
Sleep for the given number of microseconds between polls.
Lower CPU usage at the cost of higher latency.
Trait Implementations§
Source§impl Clone for PollStrategy
impl Clone for PollStrategy
Source§fn clone(&self) -> PollStrategy
fn clone(&self) -> PollStrategy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PollStrategy
impl Debug for PollStrategy
Source§impl Default for PollStrategy
impl Default for PollStrategy
Source§impl PartialEq for PollStrategy
impl PartialEq for PollStrategy
impl Copy for PollStrategy
impl Eq for PollStrategy
impl StructuralPartialEq for PollStrategy
Auto Trait Implementations§
impl Freeze for PollStrategy
impl RefUnwindSafe for PollStrategy
impl Send for PollStrategy
impl Sync for PollStrategy
impl Unpin for PollStrategy
impl UnsafeUnpin for PollStrategy
impl UnwindSafe for PollStrategy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more