Sebb commented on EXEC-106:

Huh? I don't think it's *necessary*; the current synch. works as far as I know.

However if volatile is sufficient, it should be cheaper and simpler than synch.

[AFAIK the code was originally written before Java 5 so using volatile was not 
an option then.]

> 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