Gary Gregory commented on EXEC-106:

It is possible that the thread running the run() method will NOT see changes to 
the stopped ivar made by the thread that called stopped(). If the volatile 
keyword is added to stopped, then other threads are guaranteed to see the 

> Watchdog class could use volatile instead of synch
> --------------------------------------------------
>                 Key: EXEC-106
>                 URL: https://issues.apache.org/jira/browse/EXEC-106
>             Project: Commons Exec
>          Issue Type: Improvement
>            Reporter: Sebb
>            Priority: Major
> It looks like the Watchdog class could use volatile for the boolean field 
> 'stopped' instead of synchronising.

This message was sent by Atlassian JIRA

Reply via email to