[dev] synchronous write
is at rambler-co.ru
Mon Oct 22 14:05:22 MSD 2007
On Sun, Oct 21, 2007 at 11:57:25AM +0200, Manlio Perillo wrote:
> Manlio Perillo ha scritto:
> >The mod_wsgi implementation is almost complete.
> >The only feature that I have to implement is the write callable:
> >The problem is that the WSGI spec *requires* the passed-in string to be
> >completely sent to the client when the write function returns.
> >Is this possible with Nginx?
> >It does not matter that the entire process is blocked.
> Igor, do you thing that setting temporarily the socket to blocking mode
> can be a solution?
> out.buf = b;
> out.next = NULL;
> b->pos = data;
> b->last = data + len;
> b->memory = 1;
> b->flush = 1;
> rc = ngx_http_output_filter(self->r, &out);
> I have done some tests and it seems to work.
No, this completely kill the idea of nginx - a worker will be blocked.
More information about the nginx