Skip to content

Commit

Permalink
rename thread to tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Karthik Uthaman committed Jan 29, 2025
1 parent 890bace commit 4f8e4e9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/common/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl System {
/// .with_cpu()
/// .with_disk_usage()
/// .with_exe(UpdateKind::OnlyIfNotSet)
/// .with_thread(),
/// .with_tasks(),
/// );
/// ```
///
Expand Down Expand Up @@ -314,7 +314,7 @@ impl System {
.with_cpu()
.with_disk_usage()
.with_exe(UpdateKind::OnlyIfNotSet)
.with_thread(),
.with_tasks(),
)
}

Expand Down Expand Up @@ -1865,7 +1865,7 @@ pub struct ProcessRefreshKind {
environ: UpdateKind,
cmd: UpdateKind,
exe: UpdateKind,
thread: bool,
tasks: bool,
}

impl ProcessRefreshKind {
Expand Down Expand Up @@ -1905,7 +1905,7 @@ impl ProcessRefreshKind {
environ: UpdateKind::OnlyIfNotSet,
cmd: UpdateKind::OnlyIfNotSet,
exe: UpdateKind::OnlyIfNotSet,
thread: true,
tasks: true,
}
}

Expand Down Expand Up @@ -1948,7 +1948,7 @@ It will retrieve the following information:
);
impl_get_set!(ProcessRefreshKind, cmd, with_cmd, without_cmd, UpdateKind);
impl_get_set!(ProcessRefreshKind, exe, with_exe, without_exe, UpdateKind);
impl_get_set!(ProcessRefreshKind, thread, with_thread, without_thread);
impl_get_set!(ProcessRefreshKind, tasks, with_tasks, without_tasks);
}

/// Used to determine what you want to refresh specifically on the [`Cpu`] type.
Expand Down
2 changes: 1 addition & 1 deletion src/unix/linux/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ pub(crate) fn refresh_procs(
.map(|entry| {
let Ok(entry) = entry else { return Vec::new() };
let mut entries = Vec::new();
get_all_pid_entries(None, None, entry, &mut entries, refresh_kind.thread());
get_all_pid_entries(None, None, entry, &mut entries, refresh_kind.tasks());
entries
})
.flatten()
Expand Down
2 changes: 1 addition & 1 deletion tests/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ fn test_refresh_thread() {
s.refresh_processes_specifics(
ProcessesToUpdate::All,
false,
ProcessRefreshKind::everything().without_thread(),
ProcessRefreshKind::everything().without_tasks(),
);

// Check that we have an empty thread list.
Expand Down

0 comments on commit 4f8e4e9

Please sign in to comment.