I am building application which will create a lot of threads. Each thread will connect to different remote server, and each thread has to always communicate with it's server.
Before I used PHP
, it is bad solution for such goal.
My opinion how native threads work:
For example we have 100 threads on single core. And the core will split it's working time between all threads.
And here from what I have read and understand:
If I open lot goroutines
, one goroutine
can block the execution of others goroutines
. The execution will be passed to other in specific cases (maybe when current goroutine
sleeps or something like that). But it doesn't work like native threads.
I need to make all threads to be executed fluently. Like the same processor's time for each goroutine
. I don't need that some goroutine
is being executed for long time and other will wait..
Can I achieve it with golang
? Or better use another language (which one) ?