Re: Restart pg_usleep when interrupted
| От | Nathan Bossart |
|---|---|
| Тема | Re: Restart pg_usleep when interrupted |
| Дата | |
| Msg-id | ZrOGi8RZTSHxTq9W@nathan обсуждение исходный текст |
| Ответ на | Re: Restart pg_usleep when interrupted (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>) |
| Ответы |
Re: Restart pg_usleep when interrupted
Re: Restart pg_usleep when interrupted |
| Список | pgsql-hackers |
On Wed, Aug 07, 2024 at 06:00:53AM +0000, Bertrand Drouvot wrote: > + SleepEx((microsec < 500 ? 1 : (microsec + 500) / 1000), FALSE); I think this deserves a comment. > +#define INSTR_TIME_ADD_MICROSEC(x,t) \ > + ((x).ticks += t * NS_PER_US) I'd add parentheses around "t" to ensure any expressions given as "t" are evaluated first. Also, do we need to worry about overflow here? It looks like the rest of instr_time.h is oblivious about overflow, so maybe this is better discussed in a separate thread... -- nathan
В списке pgsql-hackers по дате отправления: