Skip site navigation (1) Skip section navigation (2)

Re: [PATCHES] pg_usleep

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org,PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: [PATCHES] pg_usleep
Date: 2004-01-09 21:08:12
Message-ID: 200401092108.i09L8CD06656@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers-win32pgsql-patches
Andrew Dunstan wrote:
> Claudio Natoli said:
> >
> >
> >> patch + new file attached. Haven't tested on Windows, but
> >> should be fine.
> >
> > Would be, except for a small typo (conditional operator has an
> > additional : instead of a ?).
> 
> Darnit. please fix when applying.
> 
> > Also, we might want to change to SleepEx,
> > depending on how we eventually get signals implemented, but that's a
> > story for another day.
> >
> 
> Yes. If we use a separate thread to catch signal events then only calls in
> that thread would need to use SleepEx, no? Anyway, as you say if necessary
> it can be adjusted later.
> 
> > This, + the pipe() patch from a couple days ago, means we can just
> > about tick off the "Problems with select()" item on the Win32 TODO list
> > :-)
> >
> 
> That was the intention :-)

OK, Sleep() win32 patch attached and applied.  We already had PG_DELAY
in milliseconds, and no one was going anywhere near 2000 seconds
(overflow), so I just converted it to PG_USLEEP and used it consistenly,
with the Win32 Sleep() call added.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-patches by date

Next:From: Bruce MomjianDate: 2004-01-09 21:11:33
Subject: Re: psql \i handling ~ in specified file name
Previous:From: Bruce MomjianDate: 2004-01-09 15:13:01
Subject: Re: psql \i handling ~ in specified file name

pgsql-hackers-win32 by date

Next:From: Bruce MomjianDate: 2004-01-09 23:10:53
Subject: Re: [PATCHES] fork/exec patch: pre-CreateProcess finalization
Previous:From: Merlin MoncureDate: 2004-01-09 19:48:06
Subject: Re: Win32 signal code - first try

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group