[dev][mod_wsgi] asynchronous extensions

Igor Sysoev is at rambler-co.ru
Tue Mar 4 15:48:33 MSK 2008

On Tue, Mar 04, 2008 at 01:30:07PM +0100, Manlio Perillo wrote:

> Manlio Perillo ha scritto:
> >Hi.
> >
> >Its time to add asynchronous extensions to the WSGI module.
> >
> >I'm developing a WSGI application where I need to talk with a web 
> >service on the Internet, so it is *very* important to use an 
> >asynchronous HTTP client.
> >
> >[...]
> >
> Some more detailed questions:
> 1) Can I use NGX_READ_EVENT and NGX_WRITE_EVENT as bit masks?
>    As an example:
>    if (flags & NGX_READ_EVENT) {...}

No, they can not ORed at least in kqueue method.

> 2) What's the meaning of active, disabled, ready and oneshot attributes
>    in the event structure?
>    And what about the write attribute?

     * the event was passed or would be passed to a kernel;
     * in aio mode - operation was posted.
    unsigned         active:1;

    /* the ready event; in aio mode 0 means that no operation can be posted */
    unsigned         ready:1;

    disabled: event filter has been allocated in kernel, but disabled now.
             The optimization that allows to avoid lock aquiring in kernel

    oneshot: event filter is oneshot, Solaris event port, kqueue's EV_ONESHOT,
             epoll's EPOLLONESHOT.

    write: write event filter (NGX_WRITE_EVENT).

Next answers later.

Igor Sysoev

More information about the nginx mailing list