Hi,
I am new to threading and asynchronous programming. I am trying to learn these concepts and so far i understand it but have a question to ask.
Lets say i want to call a method called GetAllUsers(), which takes long time to execute, in a way it does not block the resources and keeps UI responsive. So, what I understand is that it can be done in 3 ways (please let me know if these are correct or have
i totally got it wrong):-
1) Threads: I can spawn a new thread and give GetAllUsers method as a threadstart. This will start the execution of the method on a different thread keeping my ui responsive and when the call is complete i can use the routing technique to update the UI controls
i.e. InvokeRequired. Is my understanding correct ?
Or
2) Asynchronous Delegates: I can create a delegate. Create a new instance of it and point it to method GetAllUsers. Then use the BeginInvoke method. The BeginInvoke under the hood will spawn ...
Go to the complete details ...