Home > other >  The go language batch related issues
The go language batch related issues

Time:04-13

In an attempt to add functionality to an existing program, make its can increase efficiency,

, for example, there are an infinite for loop, one of the methods, this method every time received from the client value, will start the corresponding method to deal with the received values, in order to increase the efficiency of program, want to give treatment method is to add a "long", namely in certain long often (such as 5 seconds) when the program to receive the client's value, the deposit will be acceptable to the value of the method, at the end of the long time, handle all receives the value at the same time,

How can we do to keep the program often don't make the whole cycle again at the same time the method run over? Or how to ensure that when the second get more value from the client at the same time, if there is no end, the method of time don't start a new the method, but continue to continue to run in the existing method?

One day a pit
  • Related