1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-16 06:01:02 +03:00

Remove sleep() and use single PG_SLEEP call for Win32 signal handling

and consistency.

Change PG_USLEEP to use SleepEx() for signal interuptability.
This commit is contained in:
Bruce Momjian
2004-01-30 15:57:04 +00:00
parent 777babeced
commit 5ee2ae2049
2 changed files with 4 additions and 7 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.153 2004/01/24 20:00:45 wieck Exp $
* $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.154 2004/01/30 15:57:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -1058,10 +1058,7 @@ BufferBackgroundWriter(void)
* Nap for the configured time or sleep for 10 seconds if
* there was nothing to do at all.
*/
if (n > 0)
PG_USLEEP(BgWriterDelay * 1000);
else
sleep(10);
PG_USLEEP((n > 0) ? BgWriterDelay * 1000 : 10000000);
}
}