X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/522d7fd117285e4e4ce3ea5ec9b5a1722521b681..80e348724041a694002fc38f57e8868b9b9a2be9:/syncer_test.go?ds=inline diff --git a/syncer_test.go b/syncer_test.go index 16f3345..d463eec 100644 --- a/syncer_test.go +++ b/syncer_test.go @@ -148,6 +148,13 @@ type SyncerGatedSync struct { release chan struct{} } +func newSyncerGatedSync() *SyncerGatedSync { + return &SyncerGatedSync{ + started: make(chan struct{}, 100), + release: make(chan struct{}), + } +} + func (g *SyncerGatedSync) Sync() error { g.mutex.Lock() @@ -184,13 +191,6 @@ func (g *SyncerGatedSync) Count() int { return g.count } -func newSyncerGatedSync() *SyncerGatedSync { - return &SyncerGatedSync{ - started: make(chan struct{}, 100), - release: make(chan struct{}), - } -} - // syncerRunKilledWriter starts the writer child on the chat in root, kills it // with SIGKILL after it acknowledged count messages, and returns the number of // messages that it acknowledged.