V
V
Vladimir Grabko2016-04-22 10:32:52
go
Vladimir Grabko, 2016-04-22 10:32:52

How to run multiple routines?

My software receives a list of commands.
I need to run each command asynchronously.
To be able to complete another from one routine. For example, the first routine starts the server, and the second routine terminates the server. I have a lot of different commands. Is it possible to? If so, what to read about this, and if not, how to make work with commands?
server start
file dowload test.ru/e.exe
server stop
these commands start the server, start the download, stop the server but do not touch the download.
Thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Pavlyuk, 2016-04-22
@lucifer-m

Run goroutines with the go command.
Communication between goroutines is done using channels.
There is a good site https://gobyexample.com
Now for some reason it is unavailable, I hope it is temporary. Go through the tutorials there in order to master the basics.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question