You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@excalibur.apache.org by "Shash Chatterjee (JIRA)" <de...@excalibur.apache.org> on 2005/04/16 17:39:02 UTC

[jira] Resolved: (EXLBR-1) Timing bug in rg.apache.excalibur.thread.ThreadControl.join()

     [ http://issues.apache.org/jira/browse/EXLBR-1?page=history ]
     
Shash Chatterjee resolved EXLBR-1:
----------------------------------

    Resolution: Fixed

Date: Sat Apr 16 07:23:23 2005
New Revision: 161570

URL: http://svn.apache.org/viewcvs?view=rev&rev=161570
Log:
Patch from: http://issues.apache.org/jira/browse/EXLBR-1
Fixes: 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. 

Modified:
    excalibur/trunk/components/thread/impl/src/java/org/apache/excalibur/thread/impl/DefaultThreadControl.java



> Timing bug in rg.apache.excalibur.thread.ThreadControl.join()
> -------------------------------------------------------------
>
>          Key: EXLBR-1
>          URL: http://issues.apache.org/jira/browse/EXLBR-1
>      Project: Excalibur Components
>         Type: Bug
>   Components: Thread
>  Environment: Mandrake 9.2 on Compaq Armada E500
>     Reporter: Pradeep Krishnan
>     Assignee: Shash Chatterjee

>
> 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. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@excalibur.apache.org
For additional commands, e-mail: dev-help@excalibur.apache.org