Re: [PATCH] rust_binder: retry ready threads or fallback to proc queue on dead thread

From: Alice Ryhl

Date: Fri Nov 27 2026 - 09:31:20 EST


On Fri, Nov 27, 2026 at 03:52:32PM +0530, Adhyansh Verma wrote:
> When ProcessInner::push_work() attempts to deliver work to a waiting
> thread from ready_threads, it previously checked only the first thread
> with an 'if let'. If that thread has exited while waiting in the pool,
> thread.push_work_inner() returns PushWorkRes::FailedDead(work).

A thread in `ready_threads` can never be dead: `Thread::release()` is
only called from `BINDER_THREAD_EXIT` on `current` (which cannot be
sleeping in `Thread::get_work()` with a `Registration` active) or from
`Process::deferred_release()` after `ready_threads` is already emptied.

So this case is unreachable, and I don't think we need this change.

Alice