pub trait Fence: Sized {
// Required method
fn wait(self) -> Result<(), ServerError>;
// Provided method
fn sync(self) -> bool { ... }
}Expand description
A synchronization primitive that blocks until the device has finished processing all commands submitted before the fence was created.
Required Methods§
Provided Methods§
Sourcefn sync(self) -> bool
fn sync(self) -> bool
wait.
What the drop queue needs: it only has to know the device is done reading the memory it is about to free. A poisoned device is done either way, and the fault reaches the caller through whatever it touches next. Any other failure leaves that unknown, so the memory must not be freed.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<A: EventApi> Fence for EventFence<A>
Available on
multi_threading only.The drop queue is where a fence pays off — a freed host buffer waits on one
rather than on the server — and it is multi_threading-only, so the impl is
too. Everything above it is the same fence either way.