I have to do a IO operation which might take long to complete. The IO oeration is invoked from a button. Ofcourse the UI hangs untill the operation completes. So I suppose I need to do IO on some background thread, but when the operation completes I have to update window's labels to signal the operation complete. Which I suppose I should be doing on the main thread (like EDT in java and similar in C#) , correct ?
in C# there is class something like TaskAsync and similar in Java android. Which lets you complete the long task in another thread and the when the task is complete a handler is called on main thread , so that UI can be updated on main thread,
What exactly does cocoa has to do similar task, that is allow a long operation on seperate thread than main and then somehow facilitate to update the userinterface on main thread.