lkml.org 
[lkml]   [2002]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] async poll for 2.5
    Davide Libenzi wrote:

    >Why would you need to use threads with a multiplex-like interface like
    >/dev/epoll ?
    >
    Because in some applications processing an event can cause the thread to
    block, potentially for a long time. Multiple threads are needed to
    isolate that block to the context associated with the event.

    > while (read() == EGAIN)
    > wait(POLLIN);
    >
    >
    Assuming registration of interest is inside wait(), this has a race. If
    the file becomes readable between the time that read() returns and the
    time that wait() can register interest, the connection will hang.

    [unhandled content-type:application/x-pkcs7-signature]
    \
     
     \ /
      Last update: 2005-03-22 13:30    [W:2.400 / U:0.124 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site