Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c xlog.c)

From: Tom Samplonius <tom(at)sdf(dot)com>
To: Alfred Perlstein <bright(at)wintelcom(dot)net>
Cc: Larry Rosenman <ler(at)lerctr(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c xlog.c)
Date: 2000-11-17 05:00:53
Message-ID: Pine.BSF.4.05.10011162059510.11338-100000@misery.sdf.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Thu, 16 Nov 2000, Alfred Perlstein wrote:

> * Larry Rosenman <ler(at)lerctr(dot)org> [001116 12:09] wrote:
> > * Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> [001116 14:02]:
> > > > > This sounds like an interesting approach, yes.
> > > > Question: Is sleep(0) guaranteed to at least give up control?
> > > >
> > > > The way I read my UnixWare 7's man page, it might not, since alarm(0)
> > > > just cancels the alarm...
> > >
> > > Well, it certainly is a kernel call, and most OS's re-evaluate on kernel
> > > call return.
> > BUT, do we know for sure that sleep(0) is not optimized in the library
> > to just return?
>
> sleep(3) should conform to POSIX specification, if anyone has the
> reference they can check it to see what the effect of sleep(0)
> should be.

Yes, but Posix also specifies sched_yield() which rather explicitly
allows a process to yield its timeslice. No idea how well that is
supported.

> --
> -Alfred Perlstein - [bright(at)wintelcom(dot)net|alfred(at)freebsd(dot)org]
> "I have the heart of a child; I keep it in a jar on my desk."

Tom

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 2000-11-17 06:33:06 Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL
Previous Message Tom Lane 2000-11-17 04:40:48 Re: [rfc] new CREATE FUNCTION (and more)