From: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com>, <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: Overhauling our interrupt handling (was Escaping from blocked send() reprised.) |
Date: | 2015-01-30 17:59:28 |
Message-ID: | 54CBC680.1030003@vmware.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 01/15/2015 03:03 AM, Andres Freund wrote:
> 0004: Process 'die' interrupts while reading/writing from the client socket.
>
> This is the reason Horiguchi-san started this thread.
> + ProcessClientWriteInterrupt(!port->noblock);
...
> +/*
> + * ProcessClientWriteInterrupt() - Process interrupts specific to client writes
> + *
> + * This is called just after low-level writes. That might be after the read
> + * finished successfully, or it was interrupted via interrupt. 'blocked' tells
> + * us whether the
> + *
> + * Must preserve errno!
> + */
> +void
> +ProcessClientWriteInterrupt(bool blocked)
You're passing port->noblock as argument, but I thought the argument is
supposed to mean whether the write would've blocked, i.e. if the write
buffer was full. port->noblock doesn't mean that. But perhaps I
misunderstood this - the comment on the 'blocked' argument above is a
bit incomplete ;-).
- Heikki
From | Date | Subject | |
---|---|---|---|
Next Message | jeff.janes | 2015-01-30 18:21:01 | |
Previous Message | Robert Haas | 2015-01-30 17:58:36 | Re: Safe memory allocation functions |