package server import "time" func (server *Server) agentManager() { // Start the great for-loop for { // Count the number of agents without a runnig task // Check if there are any new Tasks up for grabs // See if the task can be divided by the number of agents // If so, split // if not, split-1 // Try again // Give agents task, maybe even look for the ones with the most CPUs // 😴 time.Sleep(10 * time.Second) } }