For example, I have the following code:
public static void getUser(int id) { new Thread(new Runnable() { public void run() { User user = API.getUser(id); ApplicationLoader.users.put(id, user); } }).start(); }
In another thread, for example, I take information from the network. After I received the information, the flow will close itself? Or should it not close at all? How does this whole thing work?
And if for example this script will run twice at once? For example, one of the service, and the other of the activation.