X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/f5c601f1801aaa276f8c335fcb51c373edc0b50c..80e348724041a694002fc38f57e8868b9b9a2be9:/syncer_test.go 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.