Re: [PATCH 2/2] rust: sync: add `CondVar::wait_timeout`

From: Alice Ryhl
Date: Wed Dec 06 2023 - 11:39:05 EST


On Wed, Dec 6, 2023 at 4:53 PM Martin Rodriguez Reboredo
<yakoyoku@xxxxxxxxx> wrote:
>
> On 12/6/23 07:09, Alice Ryhl wrote:
> > Sleep on a condition variable with a timeout.
> >
> > This is used by Rust Binder for process freezing. There, we want to
> > sleep until the freeze operation completes, but we want to be able to
> > abort the process freezing if it doesn't complete within some timeout.
> >
> > Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
> > ---
> > [...]
> >
> > + /// Atomically releases the given lock (whose ownership is proven by the guard) and puts the
> > + /// thread to sleep. It wakes up when notified by [`CondVar::notify_one`] or
> > + /// [`CondVar::notify_all`], or when the thread receives a signal.
> > + ///
> > + /// Returns whether there is a signal pending.
>
> Remaining jiffies or zero on timeout?

Seems like I just copied this typo from the other `_internal` method.
I'll fix it on both.

Alice