Expand description
A task (aka Thread) inside of a Process
Created by Process::tasks
, tasks in
general are similar to Processes and should have mostly the same fields.
Fields
pid: i32
The ID of the process that this task belongs to
tid: i32
The task ID
Implementations
sourceimpl Task
impl Task
sourcepub fn stat(&self) -> ProcResult<Stat>
pub fn stat(&self) -> ProcResult<Stat>
Thread info from /proc/<pid>/task/<tid>/stat
Many of the returned fields will be the same as the parent process, but some fields like utime
and stime
will be per-task
sourcepub fn status(&self) -> ProcResult<Status>
pub fn status(&self) -> ProcResult<Status>
Thread info from /proc/<pid>/task/<tid>/status
Many of the returned fields will be the same as the parent process
sourcepub fn io(&self) -> ProcResult<Io>
pub fn io(&self) -> ProcResult<Io>
Thread IO info from /proc/<pid>/task/<tid>/io
This data will be unique per task.
sourcepub fn schedstat(&self) -> ProcResult<Schedstat>
pub fn schedstat(&self) -> ProcResult<Schedstat>
Thread scheduler info from /proc/<pid>/task/<tid>/schedstat
This data will be unique per task.
sourcepub fn children(&self) -> ProcResult<Vec<u32>>
pub fn children(&self) -> ProcResult<Vec<u32>>
Thread children from /proc/<pid>/task/<tid>/children
WARNING: This interface is not reliable unless all the child processes are stoppped or frozen. If a child task exits while the file is being read, non-exiting children may be omitted. See the procfs(5) man page for more information.
This data will be unique per task.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnwindSafe for Task
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