On Thu, 16 Nov 2000, Alfred Perlstein wrote: > * Larry Rosenman <[EMAIL PROTECTED]> [001116 12:09] wrote: > > * Bruce Momjian <[EMAIL PROTECTED]> [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 - [[EMAIL PROTECTED]|[EMAIL PROTECTED]] > "I have the heart of a child; I keep it in a jar on my desk." Tom
- Re: [HACKERS] RE: [COMMITTERS] pgsql/src/backend/access/t... Vadim Mikheev
- Re: [HACKERS] RE: [COMMITTERS] pgsql/src/backend/acc... Bruce Momjian
- Re: [HACKERS] RE: [COMMITTERS] pgsql/src/backend... Alfred Perlstein
- Re: [HACKERS] RE: [COMMITTERS] pgsql/src/bac... Don Baccus
- Re: [HACKERS] RE: [COMMITTERS] pgsql/sr... Bruce Momjian
- Re: [HACKERS] RE: [COMMITTERS] pgs... Don Baccus
- Re: [HACKERS] RE: [COMMITTERS] pgsq... Larry Rosenman
- Re: [HACKERS] RE: [COMMITTERS] pgsq... Bruce Momjian
- Re: [HACKERS] RE: [COMMITTERS] pgsq... Larry Rosenman
- Re: [HACKERS] RE: [COMMITTERS] pgsq... Alfred Perlstein
- Re: [HACKERS] RE: [COMMITTERS] pgsq... Tom Samplonius
- Re: [HACKERS] RE: [COMMITTERS] pgsq... Bruce Momjian
- Re: [HACKERS] RE: [COMMITTERS] pgsq... Larry Rosenman
- Re: [HACKERS] RE: [COMMITTERS] pgsq... Bruce Momjian
- Re: [HACKERS] RE: [COMMITTERS] pgsq... Larry Rosenman
- [HACKERS] WAL fsync scheduling Bruce Momjian
- Re: [HACKERS] WAL fsync scheduling Tom Lane
- Re: [HACKERS] WAL fsync scheduling Bruce Momjian
- Re: [HACKERS] WAL fsync scheduling Bruce Momjian
- Re: [HACKERS] WAL fsync scheduling Larry Rosenman
- Re: [HACKERS] WAL fsync scheduling Bruce Momjian