Ocean/ICCC/InitCacheTimer.go

22 lines
337 B
Go
Raw Normal View History

2015-06-17 15:44:52 +00:00
package ICCC
// Setup and starts the cache timer.
func initCacheTimer() {
startCacheTimerLock.Lock()
defer startCacheTimerLock.Unlock()
if cacheTimerRunning {
return
} else {
cacheTimerRunning = true
}
// Start another thread with the timer logic:
go func() {
// Endless loop:
for {
cacheTimerLogic(true)
}
}()
}