[−][src]Struct lv2_worker::Schedule
Host feature providing data to build a ScheduleHandler.
Implementations
impl<'a, P: Worker> Schedule<'a, P>
[src]
pub fn schedule_work(
&self,
worker_data: P::WorkData
) -> Result<(), ScheduleError<P::WorkData>> where
P::WorkData: 'static + Send,
[src]
&self,
worker_data: P::WorkData
) -> Result<(), ScheduleError<P::WorkData>> where
P::WorkData: 'static + Send,
Request the host to call the worker thread.
If this method fails, the data is considered as untransmitted and is returned to the caller.
This method should be called from run()
context to request that the host call the work()
method in a non-realtime context with the given arguments.
This function is always safe to call from run()
, but it is not guaranteed that the worker
is actually called from a different thread. In particular, when free-wheeling (e.g. for
offline rendering), the worker may be executed immediately. This allows single-threaded
processing with sample accuracy and avoids timing problems when run()
is executing much
faster or slower than real-time.
Plugins SHOULD be written in such a way that if the worker runs immediately, and responses from the worker are delivered immediately, the effect of the work takes place immediately with sample accuracy.
Notes about the passed data: The buffer used to pass data is managed by the host. That mean the size is unknown and may be limited. So if you need to pass huge amount of data, it's preferable to use another way, for example a sync::mpsc channel.
Trait Implementations
impl<'a, P> Feature for Schedule<'a, P>
[src]
unsafe fn from_feature_ptr(
feature: *const c_void,
class: ThreadingClass
) -> Option<Self>
[src]
feature: *const c_void,
class: ThreadingClass
) -> Option<Self>
impl<'a, P> UriBound for Schedule<'a, P>
[src]
Auto Trait Implementations
impl<'a, P> RefUnwindSafe for Schedule<'a, P> where
P: RefUnwindSafe,
P: RefUnwindSafe,
impl<'a, P> !Send for Schedule<'a, P>
impl<'a, P> !Sync for Schedule<'a, P>
impl<'a, P> Unpin for Schedule<'a, P>
impl<'a, P> UnwindSafe for Schedule<'a, P> where
P: RefUnwindSafe,
P: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,