What is the maximum number of selectable channels can a Selector handle ?

Discussion in 'Java' started by Bulent Erdemir, Jul 23, 2004.

  1. Hi, does anyone know the maximum number of SocketChannels can a
    Selector handle (or selectable channels, in general)? Considering the
    Posix select(), and Windows WaitForMultipleObjects() calls, which have
    a maximum number of descriptors which they can handle, I guess
    Selector should have an upper limit, too. However, I can't find any
    reference on the net about this limit. If there's no limit, the
    implementation should fire up independent threads which in turn will
    issue select() calls to the OS separately, which is fine (but I need
    to be sure this is the way it works). If not, I need to do this
    pooling (creating multiple selectors each handling a subset of the
    channels I'm interested in) myself.

    Surely, this limit depends on the JRE, more specifically the selector
    implementation, but I'll appreciate any comments.

    Regards,
    Bulent Erdemir
     
    Bulent Erdemir, Jul 23, 2004
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.