xavier-niu commented on a change in pull request #1257:
URL: https://github.com/apache/dubbo-go/pull/1257#discussion_r651453018



##########
File path: filter/filter_impl/graceful_shutdown_filter.go
##########
@@ -61,7 +55,7 @@ func (gf *gracefulShutdownFilter) Invoke(ctx context.Context, 
invoker protocol.I
        }
        atomic.AddInt32(&gf.activeCount, 1)
        if gf.shutdownConfig != nil && gf.activeCount > 0 {
-               gf.shutdownConfig.RequestsFinished = false
+               gf.shutdownConfig.RequestsFinished.Store(false)

Review comment:
       IMO, CAS lock is the best choice in high concurrency scenario, because 
using `sync.Mutex` may block the Goroutine and results in greater performance 
losses.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org
For additional commands, e-mail: notifications-h...@dubbo.apache.org

Reply via email to