Struct jatsl::TaskManager [−][src]
Manager for tasks and jobs
Provides context, handles resource availability changes and graceful termination
Fields
context: Context
Implementations
impl<Context> TaskManager<Context>
[src]
pub fn new(
task_id: usize,
context: Context
) -> (Self, Receiver<ResourceStatus>, OneShotReceiver<()>, WatchSender<Option<()>>)
[src]
task_id: usize,
context: Context
) -> (Self, Receiver<ResourceStatus>, OneShotReceiver<()>, WatchSender<Option<()>>)
Create a new task manager for the given task and context
pub fn create_resource_handle(&self) -> TaskResourceHandle
[src]
Create a new resource handle to notify about resource state
pub fn termination_signal(&self) -> impl Future<Output = ()>
[src]
Future that completes when the job should gracefully shutdown
pub fn termination_signal_triggered(&self) -> bool
[src]
Check if the job should enter graceful shutdown
pub async fn ready(&self)
[src]
Function to indicate to the scheduler that this job is ready to fulfull its contract. This has no effect when called from within tasks.
Trait Implementations
impl<Context: Clone> Clone for TaskManager<Context>
[src]
fn clone(&self) -> TaskManager<Context>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<Context> !RefUnwindSafe for TaskManager<Context>
impl<Context> Send for TaskManager<Context> where
Context: Send,
Context: Send,
impl<Context> Sync for TaskManager<Context> where
Context: Sync,
Context: Sync,
impl<Context> Unpin for TaskManager<Context> where
Context: Unpin,
Context: Unpin,
impl<Context> !UnwindSafe for TaskManager<Context>
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> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,