You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: view.go
    path of file: ./repos/studygolang/internal/logic
    
    the code of the file until where you have to start completion: // Copyright 2016 The StudyGolang Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// http://studygolang.com
// Author:pola
    
func (this *views) Flush() {
	logger.Debugln("start views flush")
	this.locker.Lock()
	defer this.locker.Unlock()

	// TODO：量大时，考虑copy一份，然后异步 入库，以免堵塞 锁 太久
	for _, view := range this.data {
		view.flush()
	}

	this.data = make(map[string]*view)
	this.users = make(map[string]bool)

	logger.Debugln("end views flush")
}