Re: Add comment to specify timeout unit in ConditionVariableTimedSleep()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add comment to specify timeout unit in ConditionVariableTimedSleep()
Date: 2024-03-05 06:20:48
Message-ID: Zea5wFHM897jpJ9Z@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 05, 2024 at 09:39:11AM +0530, shveta malik wrote:
> ConditionVariableTimedSleep() accepts a timeout parameter, but it
> doesn't explicitly state the unit for the timeout anywhere. To
> determine this, one needs to look into the details of the function to
> find it out from the comments of the internally called function
> WaitLatch(). It would be beneficial to include a comment in the header
> of ConditionVariableTimedSleep() specifying that the timeout is in
> milliseconds, similar to what we have for other non-static functions
> like WaitLatch and WaitEventSetWait. Attached the patch for the same.

That sounds like a good idea to me, so I'm OK with your suggestion.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2024-03-05 06:28:00 Re: Improve eviction algorithm in ReorderBuffer
Previous Message Michael Paquier 2024-03-05 06:16:33 Re: Make COPY format extendable: Extract COPY TO format implementations