pub struct LockBound<T> { /* private fields */ }Expand description
A value confined to the compositor lock: an object of the server side that is not part of the graph of the server compositor.
Upstream an object of the render interface (an imported GPU image, the
feature that imports it, the context it belongs to) is created at the
request of the UI thread, then used and disposed by jobs of the render
thread; the garbage collector shares it. Here such an object is an Rc,
so it is bound to the lock under which every job runs: the value is
reached with the server compositor in hand, which a thread only has while
it is inside the lock (or, in the mode without a second thread, while it
is the one thread of the compositor), and it is dropped inside the lock.
Unlike a ThreadBound it does not depend on the thread: both the render
thread and the thread of the compositor reach it, one at a time.
Where the graph is confined to the render thread
(LockedServerCompositor::confine_to_current_thread) the value is
still reached by both threads under the lock, for what upstream reads
from the UI thread, but only the render thread drops it: dropped by
another thread it is leaked.
Implementations§
Trait Implementations§
impl<T> Send for LockBound<T>
impl<T> Sync for LockBound<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for LockBound<T>
impl<T> !UnwindSafe for LockBound<T>
impl<T> Freeze for LockBound<T>where
ManuallyDrop<T>: Freeze,
impl<T> Unpin for LockBound<T>where
ManuallyDrop<T>: Unpin,
impl<T> UnsafeUnpin for LockBound<T>where
ManuallyDrop<T>: UnsafeUnpin,
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more