func (af *AutoFile) closeFileRoutine() { for { select { case <-af.closeTicker.C: _= af.closeFile() case <-af.closeTickerStopc: return } } }
We want to connect the people who have knowledge to the people who need it, to bring together people with different perspectives so they can understand each other better, and to empower everyone to share their knowledge.
func (af *AutoFile) closeFileRoutine() { for { select { case <-af.closeTicker.C: _= af.closeFile() case <-af.closeTickerStopc: return } } }
af.closeTicker.C
và af.closeTickerStopc
là 2 channel, đoạn code trên đợi lấy event từ 2 channel này, nếu nhận event từ channel af.closeTicker.C
thì sẽ đóng file, còn nếu nhận event từ channel af.closeTickerStopc
trước thì sẽ return và kết thúc hàm mà không gọi đóng file.Input your email to receive reset password link, or if you remember your password, you can click