On Thu, Feb 23, 2017 at 12:37 PM, Nathan Kerr
wrote:
> NewTicker function example
>
> The task of running functions on a periodic basis can be split into two
> parts: timing and execution.
>
> A ticker solves the timing problem by providing a channel that get new
> input every period. Keeping the
The example I gave already runs forever. No need for select.
As for daemonization, I have had good luck with github.com/jpillora/overseer
.
On Friday, February 24, 2017 at 1:22:36 AM UTC+1, Keith Brown wrote:
>
> Thank You all for the great examples!
>
> I added a select {} at the end so the prog
Thank You all for the great examples!
I added a select {} at the end so the program will run forever. I am trying
to have it as a deamon.
On Thursday, February 23, 2017 at 6:37:12 AM UTC-5, Nathan Kerr wrote:
>
> NewTicker function example
>
> The task of running functions on a periodic basis
NewTicker function example
The task of running functions on a periodic basis can be split into two
parts: timing and execution.
A ticker solves the timing problem by providing a channel that get new
input every period. Keeping the timing separate mitigates the impact of
execution on the timing
You can use sync WaitGroup too
https://play.golang.org/p/bb3a6t1N-C
But WILL NOT WORK ON playground, because of limitations of time package on
playground.
Regards.
Em quarta-feira, 22 de fevereiro de 2017 21:39:12 UTC-4, Keith Brown
escreveu:
>
> Oddly, I can't find a single example on the wo
Like this?
https://play.golang.org/p/rXPl7Bco0c
Em quarta-feira, 22 de fevereiro de 2017 21:39:12 UTC-4, Keith Brown
escreveu:
>
> Oddly, I can't find a single example on the world wide web for what I am
> trying to do.
>
> I have 2 functions which I want to run on a periodic basis. The functio