Github user jeking3 commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1028#discussion_r70972828
  
    --- Diff: lib/go/thrift/simple_server.go ---
    @@ -149,8 +151,10 @@ func (p *TSimpleServer) Serve() error {
     }
     
     func (p *TSimpleServer) Stop() error {
    -   p.quit <- struct{}{}
    -   p.serverTransport.Interrupt()
    +   if atomic.CompareAndSwapInt64(&p.stopped, 0, 1) {
    --- End diff --
    
    Hi, still looking for a reply to my last comment about 0 and 1.  I think 
your code relies on the fact that stop is called twice, as it will skip the 
first bump of the counter from 0 to 1, and then on the second call to stop it 
will actually stop, so I cannot approve the request.  If I misread it please 
let me know.


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