switchpool in a goroutine