pub struct Task<'a>(_);
Expand description
A task is a logical unit of work performed by a particular thread. See the Task API documentation for more information.
let _env_path = scoped_env::ScopedEnv::set("INTEL_LIBITTNOTIFY64", "<some path>");
let domain = Domain::new("domain");
let name = StringHandle::new("task");
// Measure a task using a pre-initialized string handle (most efficient).
{
let task = Task::begin(&domain, name);
let _ = 2 + 2;
task.end(); // Task ended here.
let _ = 3 + 3;
}
// Measure a task using a string reference (most convenient).
{
let _task = Task::begin(&domain, "task");
let _ = 2 + 2;
// Task ended here, when dropped.
}
Implementations
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Task<'a>
impl<'a> Send for Task<'a>
impl<'a> Sync for Task<'a>
impl<'a> Unpin for Task<'a>
impl<'a> UnwindSafe for Task<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more