Uploaded image for project: 'Excalibur Components'
  1. Excalibur Components
  2. EXLBR-1

Timing bug in rg.apache.excalibur.thread.ThreadControl.join()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • Thread
    • None
    • Mandrake 9.2 on Compaq Armada E500

    Description

      The ThreadControl implimentation in org.apache.excalibur.thread.impl.DefaultThreadControl has a timing bug in the join() function. There is a small timing window between the time the worker thread has finished executing and before a call to the finish() method of the ThreadControl is made. This can cause the threads waiting on a join(0) to never wake-up.

      The patch is simple: instead of delegating the join() to the m_thread, do a wait(). The finish() method of the org.apache.excalibur.thread.impl.DefaultThreadControl does a notifyAll() and that should wake up the calling thread.

      Attachments

        Activity

          People

            shash Sasvata Chatterjee
            pradeepk Pradeep Krishnan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: