N
N
nano_e_t_42018-05-06 09:59:14
go
nano_e_t_4, 2018-05-06 09:59:14

How to synchronize the launch of a function?

Hello everyone
Tell me this case:
There is a function that runs in a goroutine from different parts of the code that works with one array. It is necessary to synchronize the launch of this function in this way:
Check if such a function is already running, if it is running, then reset the array changes that it made and start again with the argument passed from the channel

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question