You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "joao-r-reis (via GitHub)" <gi...@apache.org> on 2025/04/24 15:03:35 UTC
Re: [PR] CASSGO-41 Fix deadlock in refresh debouncer stop [cassandra-gocql-driver]
joao-r-reis commented on code in PR #1767:
URL: https://github.com/apache/cassandra-gocql-driver/pull/1767#discussion_r2058663844
##########
host_source.go:
##########
@@ -747,25 +747,27 @@ const (
// debounces requests to call a refresh function (currently used for ring refresh). It also supports triggering a refresh immediately.
type refreshDebouncer struct {
mu sync.Mutex
- stopped bool
broadcaster *errorBroadcaster
interval time.Duration
timer *time.Timer
refreshNowCh chan struct{}
- quit chan struct{}
refreshFn func() error
+ quitCtxFn context.CancelFunc
Review Comment:
Your solution is much simpler and more obvious, Idk why I overcomplicated things. Done
--
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.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org