Uploaded image for project: 'XNIO'
  1. XNIO
  2. XNIO-303

WorkerThread selector synchronisation issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.5.2.Final
    • None
    • None
    • None

      Lets imagine that key.interestOps() in thread 1 is called so captures the value 0, then thread 2 is scheduled, calls key.interestOps(), captures value 0 too, then thread 1 is scheduled again and calls interestOps, now interestOps has a value of 4 (write). Thread2 is scheduled and calls interestOps, now interestOps has a value of 1 (read).
      So at the end we should have 5 we have 1, interest in write has been lost.

      This scenario is possible, it has been observed reading traces.

            jdenise@redhat.com Jean Francois Denise
            jdenise@redhat.com Jean Francois Denise
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: