Re: Use nanosleep(2) in pg_usleep, if available?
От | Robert Haas |
---|---|
Тема | Re: Use nanosleep(2) in pg_usleep, if available? |
Дата | |
Msg-id | CA+TgmobkuSFwu9yvL5UxPrY-4OgFc5--p0os=qy8BHmfjGPWGg@mail.gmail.com обсуждение исходный текст |
Ответ на | Use nanosleep(2) in pg_usleep, if available? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Use nanosleep(2) in pg_usleep, if available?
|
Список | pgsql-hackers |
On Mon, Mar 11, 2019 at 8:03 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > While the WaitLatch alternative avoids the problem, I doubt > we're ever going to remove pg_usleep entirely, so it'd be > good if it had fewer sharp edges. nanosleep() has the > same behavior as Windows, ie, the sleep is guaranteed to be > terminated by a signal. So if we used nanosleep() where available > we'd have that behavior on just about every interesting platform. Is there any feasible way to go the other way, and make pg_usleep() actually always sleep for the requested time, rather than terminating early? (Probably not, but I'm just asking.) -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: