struct DespawnCleanup {Show 13 fields
workspace: Arc<Workspace>,
project_key: ProjectKey,
label: String,
force: bool,
worktree_path: Option<PathBuf>,
worktree_display: String,
worktree_already_gone: bool,
claim: Option<WorktreeClaimGuard>,
worktree_root: Option<PathBuf>,
project_view: Option<ProjectView>,
live: Option<WorkerEntry>,
is_git_repo: bool,
respond: Sender<DespawnResult>,
}Expand description
The despawn’s filesystem half, handed to the blocking pool.
Split out of handle_despawn_worker so the peek, the dirty verdict’s
ordering and the teardown stay on the calling task, while the probe and the
cleanup’s own git calls - the git worktree remove above all - run off
the runtime.
Fields§
§workspace: Arc<Workspace>§project_key: ProjectKey§label: String§force: bool§worktree_path: Option<PathBuf>§worktree_display: String§worktree_already_gone: bool§claim: Option<WorktreeClaimGuard>The path’s claim, held until the cleanup ends so no spawn in another project can enter the tree while it is removed.
worktree_root: Option<PathBuf>The checkout whose .claude/worktrees holds the worker’s tree -
the repo every git call in the cleanup anchors on. The main
checkout for a worker the CLI forked under it. None when the
project is no longer loaded and the row recorded no tree of its
own.
project_view: Option<ProjectView>§live: Option<WorkerEntry>§is_git_repo: bool§respond: Sender<DespawnResult>Implementations§
Source§impl DespawnCleanup
impl DespawnCleanup
Sourcefn run(self, pending: DespawnCleanupPending)
fn run(self, pending: DespawnCleanupPending)
Run the cleanup, holding pending - the label’s in-flight mark -
until the end, so the label is reserved for every step that touches
the worktree and released only once the removal is done and its
outcome has been announced.
Auto Trait Implementations§
impl !RefUnwindSafe for DespawnCleanup
impl !UnwindSafe for DespawnCleanup
impl Freeze for DespawnCleanup
impl Send for DespawnCleanup
impl Sync for DespawnCleanup
impl Unpin for DespawnCleanup
impl UnsafeUnpin for DespawnCleanup
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more