[][src]Struct lv2_worker::Schedule

#[repr(transparent)]pub struct Schedule<'a, P> { /* fields omitted */ }

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]

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]

impl<'a, P> UriBound for Schedule<'a, P>[src]

Auto Trait Implementations

impl<'a, P> RefUnwindSafe for Schedule<'a, P> where
    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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.