L
L
Lexa-slesar2019-01-13 17:22:45
go
Lexa-slesar, 2019-01-13 17:22:45

How to create asynchrony?

You need to make an application that will have 2 functions:
1) a snout that will access the database and write data there
2) something unknown that will access the database, take data from there, execute a request to the API, take data from there and write to DB_2 .
And the data from DB_2 will be displayed on the website.
What is the best way to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Pavlyuk, 2019-01-13
@Lexa-slesar

Just make point 1 and 2 in different goroutines. Asynchrony is already there by default in Go, and you can just write sequential code and not worry about it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question