mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-15 01:23:51 +08:00
Clean up some stale comments
This commit is contained in:
parent
f5a02e590d
commit
6dad396498
|
@ -178,7 +178,7 @@ impl FdEventSignaller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Each item added to fd_monitor_t is assigned a unique ID, which is not recycled. Items may have
|
/// Each item added to FdMonitor is assigned a unique ID, which is not recycled. Items may have
|
||||||
/// their callback triggered immediately by passing the ID. Zero is a sentinel.
|
/// their callback triggered immediately by passing the ID. Zero is a sentinel.
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||||
pub struct FdMonitorItemId(u64);
|
pub struct FdMonitorItemId(u64);
|
||||||
|
@ -481,7 +481,6 @@ impl BackgroundFdMonitor {
|
||||||
|
|
||||||
// Service all items that are either readable or have timed out, and remove any which
|
// Service all items that are either readable or have timed out, and remove any which
|
||||||
// say to do so.
|
// say to do so.
|
||||||
|
|
||||||
self.items
|
self.items
|
||||||
.retain_mut(|item| servicer(item) == ItemAction::Retain);
|
.retain_mut(|item| servicer(item) == ItemAction::Retain);
|
||||||
|
|
||||||
|
@ -541,9 +540,6 @@ impl BackgroundFdMonitor {
|
||||||
/// fds arounds; this is why it's very hacky!
|
/// fds arounds; this is why it's very hacky!
|
||||||
impl Drop for FdMonitor {
|
impl Drop for FdMonitor {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
// Safety: this is a port of the C++ code and we are running in the destructor. The C++ code
|
|
||||||
// had no way to bubble back any errors encountered here, and the pthread mutex the C++ code
|
|
||||||
// uses does not have a concept of mutex poisoning.
|
|
||||||
self.data.lock().expect("Mutex poisoned!").terminate = true;
|
self.data.lock().expect("Mutex poisoned!").terminate = true;
|
||||||
self.change_signaller.post();
|
self.change_signaller.post();
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,8 @@ pub const FIRST_HIGH_FD: RawFd = 10;
|
||||||
/// A sentinel value indicating no timeout.
|
/// A sentinel value indicating no timeout.
|
||||||
pub const NO_TIMEOUT: u64 = u64::MAX;
|
pub const NO_TIMEOUT: u64 = u64::MAX;
|
||||||
|
|
||||||
/// A helper type for managing and automatically closing a file descriptor
|
/// A helper type for managing and automatically closing a file descriptor.
|
||||||
///
|
/// Importantly this supports an invalid state with an fd of -1.
|
||||||
/// This was implemented in rust as a port of the existing C++ code but it didn't take its place
|
|
||||||
/// (yet) and there's still the original cpp implementation in `src/fds.h`, so its name is
|
|
||||||
/// disambiguated because some code uses a mix of both for interop purposes.
|
|
||||||
pub struct AutoCloseFd {
|
pub struct AutoCloseFd {
|
||||||
fd_: RawFd,
|
fd_: RawFd,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user