I've started learing an asynchronous aproach, and
encountered a problem, help me with it.
The purpose is: get from somewhere a
char data, and after that do something with it(using as text on the button, in my case). The code, that is pinned below is very slow. The most slowiest moment is a data getting: the fact is that the
get(int id) function loads data from internet via
WinInet(synchronously), sending the Post methods, and returning the answer.
strcpy(data, get(i,q)); // i, q - just some identifier data
The first question:
How should it be solved(generaly, I mean, if
get has nothing to do with the internet, but runs slow)? I have only one, stupid idea: run
get in every separate thread. If it's the right way - how should I do that? Cause, it's wrong to, created 50 threads call from each the
get function. 50
How to realize it with
WinInet? Have red MSDN, but it too hardly for me, as for newer, maybe you explain it more simlier?