Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-6638

[classlib][nio]Some Selector behavior fixed.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.0M14
    • Fix Version/s: None
    • Component/s: Classlib
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      There are some problems with harmony Selector:
      1. When a serversocket channel does not bind anything, selector should return acceptable. In this situation, poll return POLLHUP. I add this flag to the native code.
      2. The same as 1, when a socketChannel does not connect any anything, selector should return connectable. In this situation, poll return POLLHUP, I also add this flag to the native code.
      3. As the spec said, selector should also return if an error occurred. I'm not testing the error condition, but I add POLLERR to the native code.
      4. If user change the interested operations of a selector, this selector should treated as a new one (but with the same SelectionKey). On the other hand, if the selector was return once and no interested operation changed, it should not be selected next time. I have add a flag stateChange in the SelectionKeyImpl to save this state.

        Attachments

        1. HARMONY-6638.diff
          13 kB
          Charles Lee

          Activity

            People

            • Assignee:
              littlee Charles Lee
              Reporter:
              littlee Charles Lee
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: