Github user Jaskey commented on the issue:

    https://github.com/apache/incubator-rocketmq/pull/68
  
    @shroman 
    Actully setServiceState should be synchroinzed in my opnion, say if I am 
trying to shutdown, and some other thread B is trying to setServiceState ,which 
should be waiting for `shutdown` , or shutdown may not be completed since only 
`RUNNIG` state can be really shutdowned .
    
    If thread B is setting the state as SHUTDOWN_AREADY afterwards, shutdown 
will actually do nothing. So with the setServiceState, I do think 
synchrinization is needed, but I do NOT think `setServiceState` should be 
public which is dangerous 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to